sek

An efficient implementation of ephemeral and persistent sequences
IN THIS PACKAGE
include module type of struct include S.Emulated.List end

The submodule List is a replacement for OCaml's standard List module, where a list is implemented as a persistent sequence.

type 'a t = 'a S.P.t
type 'a list = 'a t
val length : 'a list -> int
val compare_lengths : 'a list -> 'b list -> int
val compare_length_with : 'a list -> int -> int
val cons : 'a -> 'a list -> 'a list
val hd : 'a list -> 'a
val tl : 'a list -> 'a list
val nth : 'a list -> int -> 'a
val nth_opt : 'a list -> int -> 'a option
val rev : 'a list -> 'a list
val append : 'a list -> 'a list -> 'a list
val (@) : 'a list -> 'a list -> 'a list
val rev_append : 'a list -> 'a list -> 'a list
val concat : 'a list list -> 'a list
val flatten : 'a list list -> 'a list
val iter : ( 'a -> unit ) -> 'a list -> unit
val iteri : ( int -> 'a -> unit ) -> 'a list -> unit
val fold_left : ( 'a -> 'b -> 'a ) -> 'a -> 'b list -> 'a
val fold_right : ( 'a -> 'b -> 'b ) -> 'a list -> 'b -> 'b
val iter2 : ( 'a -> 'b -> unit ) -> 'a list -> 'b list -> unit
val fold_left2 : ( 'a -> 'b -> 'c -> 'a ) -> 'a -> 'b list -> 'c list -> 'a
val fold_right2 : ( 'a -> 'b -> 'c -> 'c ) -> 'a list -> 'b list -> 'c -> 'c
val for_all : ( 'a -> bool ) -> 'a list -> bool
val exists : ( 'a -> bool ) -> 'a list -> bool
val for_all2 : ( 'a -> 'b -> bool ) -> 'a list -> 'b list -> bool
val exists2 : ( 'a -> 'b -> bool ) -> 'a list -> 'b list -> bool
val mem : 'a -> 'a list -> bool
val memq : 'a -> 'a list -> bool
val find : ( 'a -> bool ) -> 'a list -> 'a
val find_opt : ( 'a -> bool ) -> 'a list -> 'a option
val find_map : ( 'a -> 'b option ) -> 'a list -> 'b option
val filter : ( 'a -> bool ) -> 'a list -> 'a list
val find_all : ( 'a -> bool ) -> 'a list -> 'a list
val filteri : ( int -> 'a -> bool ) -> 'a list -> 'a list
val partition : ( 'a -> bool ) -> 'a list -> 'a list * 'a list
val assoc : 'a -> ('a * 'b) list -> 'b
val assoc_opt : 'a -> ('a * 'b) list -> 'b option
val assq : 'a -> ('a * 'b) list -> 'b
val assq_opt : 'a -> ('a * 'b) list -> 'b option
val mem_assoc : 'a -> ('a * 'b) list -> bool
val mem_assq : 'a -> ('a * 'b) list -> bool
val split : ('a * 'b) list -> 'a list * 'b list
val combine : 'a list -> 'b list -> ('a * 'b) list
val sort : ( 'a -> 'a -> int ) -> 'a list -> 'a list
val stable_sort : ( 'a -> 'a -> int ) -> 'a list -> 'a list
val fast_sort : ( 'a -> 'a -> int ) -> 'a list -> 'a list
val uniq : ( 'a -> 'a -> int ) -> 'a list -> 'a list
val sort_uniq : ( 'a -> 'a -> int ) -> 'a list -> 'a list
val merge : ( 'a -> 'a -> int ) -> 'a list -> 'a list -> 'a list
val to_seq : 'a list -> 'a Seq.t
val empty : D.element P.t
val init : int -> ( int -> D.element ) -> D.element list
val map : ( 'a -> D.element ) -> 'a list -> D.element list
val mapi : ( int -> 'a -> D.element ) -> 'a list -> D.element list
val rev_map : ( 'a -> D.element ) -> 'a list -> D.element list
val filter_map : ( 'a -> D.element option ) -> 'a list -> D.element list
val concat_map : ( 'a -> D.element list ) -> 'a list -> D.element list
val map2 : ( 'a -> 'b -> D.element ) -> 'a list -> 'b list -> D.element list
val rev_map2 : ( 'a -> 'b -> D.element ) -> 'a list -> 'b list -> D.element list
val fold_left_map : ( 'a -> 'b -> 'a * D.element ) -> 'c -> 'b list -> 'a * D.element list
val of_seq : D.element Seq.t -> D.element list