package sek

  1. Overview
  2. Docs

The submodule Array is a replacement for OCaml's standard Array module, where an array is implemented as an ephemeral sequence.

type 'a t = 'a E.t
type 'a array = 'a t
val length : 'a array -> length
val get : 'a array -> index -> 'a
val set : 'a array -> index -> 'a -> unit
val make : 'a -> length -> 'a -> 'a array
val create_float : length -> float array
val init : 'a -> length -> (index -> 'a) -> 'a array
val make_matrix : 'a -> length -> length -> 'a -> 'a array array
val append : 'a array -> 'a array -> 'a array
val concat : 'a -> 'a array list -> 'a array
val sub : 'a array -> index -> length -> 'a array
val copy : 'a array -> 'a array
val fill : 'a array -> index -> length -> 'a -> unit
val blit : 'a array -> index -> 'a array -> index -> length -> unit
val to_list : 'a array -> 'a list
val of_list : 'a -> 'a list -> 'a array
val iter : ('a -> unit) -> 'a array -> unit
val iteri : (int -> 'a -> unit) -> 'a array -> unit
val map : 'b -> ('a -> 'b) -> 'a array -> 'b array
val mapi : 'b -> (index -> 'a -> 'b) -> 'a array -> 'b array
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b array -> 'a
val fold_right : ('b -> 'a -> 'a) -> 'b array -> 'a -> 'a
val iter2 : ('a -> 'b -> unit) -> 'a array -> 'b array -> unit
val map2 : 'c -> ('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array
val for_all : ('a -> bool) -> 'a array -> bool
val exists : ('a -> bool) -> 'a array -> bool
val for_all2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool
val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool
val mem : 'a -> 'a array -> bool
val memq : 'a -> 'a array -> bool
val sort : ('a -> 'a -> comparison) -> 'a array -> unit
val stable_sort : ('a -> 'a -> comparison) -> 'a array -> unit
val fast_sort : ('a -> 'a -> comparison) -> 'a array -> unit
val to_seq : 'a array -> 'a Seq.t
val to_seqi : 'a array -> (index * 'a) Seq.t
val of_seq : 'a -> 'a Seq.t -> 'a array
OCaml

Innovation. Community. Security.