## typelocked-rw-vector.api
# Compiled by:
#
src/lib/std/src/standard-core.sublib# Generic interface for typelocked rw_vector packages.
### "My own suspicion is that the universe is
### not only queerer than we suppose,
### but queerer than we can suppose."
###
### -- J. B. S. Haldane
api Typelocked_Rw_Vector {
#
eqtype Rw_Vector;
Element;
Vector;
maximum_vector_length: Int; # Absolute maximum number of elements in a vector. (A couple of billion on 32-bit machines.)
# rw_vector creation functions
make_rw_vector: (Int, Element) -> Rw_Vector;
from_list: List( Element ) -> Rw_Vector;
from_fn: (Int, (Int -> Element)) -> Rw_Vector;
# Note: The (_[]) enables 'vec[index]' notation;
# The (_[]:=) enables 'vec[index] := value' notation;
length: Rw_Vector -> Int;
get: (Rw_Vector, Int) -> Element;
(_[]): (Rw_Vector, Int) -> Element;
set: (Rw_Vector, Int, Element) -> Void;
(_[]:=): (Rw_Vector, Int, Element) -> Void;
to_vector: Rw_Vector -> Vector;
copy: { from: Rw_Vector, into: Rw_Vector, at: Int } -> Void;
copy_vector: { from: Vector, into: Rw_Vector, at: Int } -> Void;
keyed_apply: ((Int, Element) -> Void) -> Rw_Vector -> Void;
apply: (Element -> Void) -> Rw_Vector -> Void;
keyed_map_in_place: ((Int, Element) -> Element) -> Rw_Vector -> Void;
map_in_place: (Element -> Element) -> Rw_Vector -> Void;
keyed_fold_forward: ((Int, Element, X) -> X) -> X -> Rw_Vector -> X;
keyed_fold_backward: ((Int, Element, X) -> X) -> X -> Rw_Vector -> X;
fold_forward: ((Element, X) -> X) -> X -> Rw_Vector -> X;
fold_backward: ((Element, X) -> X) -> X -> Rw_Vector -> X;
keyed_find: ((Int, Element) -> Bool) -> Rw_Vector -> Null_Or ((Int, Element));
find: (Element -> Bool) -> Rw_Vector -> Null_Or( Element );
exists: (Element -> Bool) -> Rw_Vector -> Bool;
all: (Element -> Bool) -> Rw_Vector -> Bool;
compare_sequences: ((Element, Element) -> Order) -> (Rw_Vector, Rw_Vector) -> Order;
};
## COPYRIGHT (c) 1994 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.