In addition to the functions which we have seen the Vector structure in the Standard ML library also provides the following. The functions Vector.foldli and Vector.foldri differ from familiar left and right folding in that they also make use of the integer index into the vector and thus are near relatives of the for loops in Pascal-like programming languages. Such loops supply an integer loop control variable which is automatically incremented on each loop iteration (and may not be altered within the loop body). The Vector.foldli and Vector.foldri functions operate on vector slices.
Vector.concat : 'a vector list -> 'a vector Vector.foldl : ('a * 'b -> 'b) -> 'b -> 'a vector -> 'b Vector.foldr : ('a * 'b -> 'b) -> 'b -> 'a vector -> 'b Vector.foldli : (int * 'a * 'b -> 'b) -> 'b -> 'a vector * int * int option -> 'b Vector.foldri : (int * 'a * 'b -> 'b) -> 'b -> 'a vector * int * int option -> 'b Vector.length : 'a vector -> int Vector.tabulate : int * (int -> 'a) -> 'a vector