The standard library Vector_Slice package defines access to subvectors within a Vector instance. This allows referencing such subvectors in constant time and space without duplication of data.
The Vector_Slice api is implemented by the vector_slice package.
The Vector_Slice api source code is in src/lib/std/src/vector-slice.api.
See also: Vector.
The above information is manually maintained and may contain errors.
api { Slice X; length : Slice(X ) -> Int; get : (Slice(X ) , Int) -> X; make_full_slice : vector::Vector(X ) -> Slice(X ); make_slice : (vector::Vector(X ) , Int , Null_Or(Int )) -> Slice(X ); make_subslice : (Slice(X ) , Int , Null_Or(Int )) -> Slice(X ); burst_slice : Slice(X ) -> (vector::Vector(X ) , Int , Int); to_vector : Slice(X ) -> vector::Vector(X ); cat : List(Slice(X ) ) -> vector::Vector(X ); is_empty : Slice(X ) -> Bool; get_item : Slice(X ) -> Null_Or(((X , Slice(X ))) ); keyed_apply : ((Int , X) -> Void) -> Slice(X ) -> Void; apply : (X -> Void) -> Slice(X ) -> Void; keyed_map : ((Int , X) -> Y) -> Slice(X ) -> vector::Vector(Y ); map : (X -> Y) -> Slice(X ) -> vector::Vector(Y ); keyed_fold_forward : ((Int , X , Y) -> Y) -> Y -> Slice(X ) -> Y; keyed_fold_backward : ((Int , X , Y) -> Y) -> Y -> Slice(X ) -> Y; fold_forward : ((X , Y) -> Y) -> Y -> Slice(X ) -> Y; fold_backward : ((X , Y) -> Y) -> Y -> Slice(X ) -> Y; keyed_find : ((Int , X) -> Bool) -> Slice(X ) -> Null_Or(((Int , X)) ); find : (X -> Bool) -> Slice(X ) -> Null_Or(X ); exists : (X -> Bool) -> Slice(X ) -> Bool; all : (X -> Bool) -> Slice(X ) -> Bool; compare_sequences : ((X , X) -> Order) -> (Slice(X ) , Slice(X )) -> Order;};