-
Notifications
You must be signed in to change notification settings - Fork 5
2015 003j VectorSlice
John Reppy edited this page Jul 9, 2023
·
1 revision
structure VectorSlice : VECTOR_SLICEWe propose two new functions for the VectorSlice module.
This page is part of proposal 2015-003.
val toList : 'a slice -> 'a list
val toVector : 'a slice -> 'a vectortoList slice
returns the list of the elements in the vector slice `slice`.
toVector slice
The toVector function is the same as the existing vector function, but it
follows the toType/fromType naming convention.
The toList operation complements the existing fromList and can be implemented more
efficiently than by using List.tabulate. Adding it helps reduce the friction of
converting between the different sequence types.
