Batteries user guide : BatArray.Cap.Labels

# Module BatArray.Cap.Labels

    module Labels: sig .. end

Operations on `BatArray.Cap` with labels.

    val init : int -> f:(int -> 'a) -> ('a, [< `Read | `Write ]) BatArray.Cap.t

    val make : int -> init:'a -> ('a, [< `Read | `Write ]) BatArray.Cap.t

    val create : int -> init:'a -> ('a, [< `Read | `Write ]) BatArray.Cap.t

    val make_matrix : dimx:int ->
           dimy:int ->
           'a ->
           (('a, [< `Read | `Write ]) BatArray.Cap.t, [< `Read | `Write ])
           BatArray.Cap.t

    val create_matrix : dimx:int ->
           dimy:int ->
           'a ->
           (('a, [< `Read | `Write ]) BatArray.Cap.t, [< `Read | `Write ])
           BatArray.Cap.t

    val sub : ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           pos:int -> len:int -> ('a, [< `Read | `Write ]) BatArray.Cap.t

    val fill : ('a, [< `Read | `Write > `Write ]) BatArray.Cap.t ->
           pos:int -> len:int -> 'a -> unit

    val blit : src:('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           src_pos:int ->
           dst:('a, [< `Read | `Write > `Write ]) BatArray.Cap.t ->
           dst_pos:int -> len:int -> unit

    val iter : f:('a -> unit) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit

    val map : f:('a -> 'b) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           ('b, [< `Read | `Write ]) BatArray.Cap.t

    val iteri : f:(int -> 'a -> unit) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit

    val mapi : f:(int -> 'a -> 'b) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           ('b, [< `Read | `Write ]) BatArray.Cap.t

    val modify : f:('a -> 'a) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit

    val modifyi : f:(int -> 'a -> 'a) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit

    val fold_left : f:('a -> 'b -> 'a) ->
           init:'a -> ('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a

    val fold_right : f:('b -> 'a -> 'a) ->
           ('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> init:'a -> 'a

    val sort : cmp:('a -> 'a -> int) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit

    val stable_sort : cmp:('a -> 'a -> int) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit

    val fast_sort : cmp:('a -> 'a -> int) -> ('a, [ `Read | `Write ]) BatArray.Cap.t -> unit

    val iter2 : f:('a -> 'b -> unit) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           ('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit

    val iter2i : f:(int -> 'a -> 'b -> unit) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           ('b, [< `Read | `Write > `Read ]) BatArray.Cap.t -> unit

    val exists : f:('a -> bool) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> bool

    val for_all : f:('a -> bool) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> bool

    val find : f:('a -> bool) -> ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t -> 'a

    val map : f:('a -> 'b) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           ('b, [< `Read | `Write ]) BatArray.Cap.t

    val mapi : f:(int -> 'a -> 'b) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           ('b, [< `Read | `Write ]) BatArray.Cap.t

    val filter : f:('a -> bool) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           ('a, [< `Read | `Write ]) BatArray.Cap.t

    val filter_map : f:('a -> 'b option) ->
           ('a, [< `Read | `Write > `Read ]) BatArray.Cap.t ->
           ('b, [< `Read | `Write ]) BatArray.Cap.t