- Notifications
You must be signed in to change notification settings - Fork5
2015 003f MONO_VECTOR
John Reppy edited this pageSep 2, 2015 ·1 revision
signature MONO_VECTORWe propose three new functions for theMONO_VECTOR signature to track the changesto theVector structure.
This page is part of proposal2015-003.
val toList : vector -> elem listval append : vector * elem -> vectorval prepend : elem * vector -> vector
toList vec
returns the list of the elements of the vector `vec`.Will raise the `Size` exception if the resulting vector would exceed `maxLen` elements.
append (vec, x)
returns the vector formed by adding the element `x` to the end of the vector `vec`.Will raise the `Size` exception if the resulting vector would exceed `maxLen` elements.
prepend (x, vec)
returns the vector formed by adding the element `x` to the beginning of the vector `vec`.Will raise the `Size` exception if the resulting vector would exceed `maxLen` elements.
These additions track the changes to theVector structure.
