PreviousUpNext

14.2.41  Rw_Vector_Slice

The standard library Rw_Vector_Slice api defines access to subvectors within a Rw_Vector instance. This allows referencing such subvectors in constant time and space without duplication of data.

The Rw_Vector_Slice api is implemented by the rw_vector_slice package.

The Rw_Vector_Slice api source code is in src/lib/std/src/rw-vector-slice.api.

See also: Rw_Vector.

The above information is manually maintained and may contain errors.

api {
    Slice X;
    length : Slice(X ) -> Int;
    get : (Slice(X ) , Int) -> X;
    set : (Slice(X ) , Int , X) -> Void;
    make_full_slice : Rw_Vector(X ) -> Slice(X );
    make_slice : (Rw_Vector(X ) , Int , Null_Or(Int )) -> Slice(X );
    make_subslice : (Slice(X ) , Int , Null_Or(Int )) -> Slice(X );
    burst_slice : Slice(X ) -> (Rw_Vector(X ) , Int , Int);
    to_vector : Slice(X ) -> vector::Vector(X );
    copy : {di:Int, dst:Rw_Vector(X ), src:Slice(X )} -> Void;
    copy_vec : {di:Int, dst:Rw_Vector(X ), src:vector_slice::Slice(X )} -> Void;
    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_in_place : ((Int , X) -> X) -> Slice(X ) -> Void;
    map_in_place : (X -> X) -> Slice(X ) -> Void;
    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;};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext