You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val toList : 'a array -> 'a list
val fromVector : 'a vector -> 'a array
val toVector : 'a array -> 'a vector
Description
toList arr
returns the list of the elements of the array `arr`.
fromVector vec
returns a new array that is initialized to the content of the vector `vec`.
toVector vec
returns a vector of the elements of the array `arr`.
Discussion
The toVector function is the same as the existing vector function, but it
follows the toType/fromType naming convention.
Rationale
The toList operation complements the existing fromList and can be implemented more
efficiently than by using List.tabulate.
Adding the fromVector and toVector functions help reduce the friction of converting
between different sequence types.