module CCRAL:sig..end
This is an OCaml implementation of Okasaki's paper "Purely Functional Random Access Lists". It defines a list-like data structure with O(1) cons/tail operations, and O(log(n)) lookup/modification operations.
    This module used to be part of containers.misc
    status: stable
Since 0.13
type +'a t 
val empty : 'a tval is_empty : 'a t -> boolval cons : 'a -> 'a t -> 'a tval return : 'a -> 'a tval map : f:('a -> 'b) -> 'a t -> 'b tval mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b tval hd : 'a t -> 'aInvalid_argument if the list is emptyval tl : 'a t -> 'a tInvalid_argument if the list is emptyval front : 'a t -> ('a * 'a t) optionval front_exn : 'a t -> 'a * 'a t
val length : 'a t -> intval get : 'a t -> int -> 'a optionget l i accesses the i-th element of the list. O(log(n)).val get_exn : 'a t -> int -> 'a
val set : 'a t -> int -> 'a -> 'a tset l i v sets the i-th element of the list to v. O(log(n)).Invalid_argument if the list has less than i+1 elements.val remove : 'a t -> int -> 'a tremove l i removes the i-th element of v.Invalid_argument if the list has less than i+1 elements.val append : 'a t -> 'a t -> 'a t
val filter : f:('a -> bool) -> 'a t -> 'a t
val filter_map : f:('a -> 'b option) -> 'a t -> 'b t
val flat_map : ('a -> 'b t) -> 'a t -> 'b t
val flatten : 'a t t -> 'a t
val app : ('a -> 'b) t -> 'a t -> 'b t
val take : int -> 'a t -> 'a t
val take_while : f:('a -> bool) -> 'a t -> 'a t
val drop : int -> 'a t -> 'a t
val drop_while : f:('a -> bool) -> 'a t -> 'a t
val take_drop : int -> 'a t -> 'a t * 'a ttake_drop n l splits l into a, b such that length a = n
    if length l >= n, and such that append a b = lval iter : f:('a -> unit) -> 'a t -> unitval iteri : f:(int -> 'a -> unit) -> 'a t -> unit
val fold : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'bval fold_rev : f:('b -> 'a -> 'b) -> x:'b -> 'a t -> 'bval rev_map : f:('a -> 'b) -> 'a t -> 'b trev_map f l is the same as map f (rev l)val rev : 'a t -> 'a tval equal : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ?cmp:('a -> 'a -> int) -> 'a t -> 'a t -> intval make : int -> 'a -> 'a t
val repeat : int -> 'a t -> 'a trepeat n l is append l (append l ... l) n timesval range : int -> int -> int trange i j is i; i+1; ... ; j or j; j-1; ...; itype'asequence =('a -> unit) -> unit
type'agen =unit -> 'a option
val add_list : 'a t -> 'a list -> 'a t
val of_list : 'a list -> 'a tval to_list : 'a t -> 'a list
val of_list_map : f:('a -> 'b) -> 'a list -> 'b t
val of_array : 'a array -> 'a t
val add_array : 'a t -> 'a array -> 'a t
val to_array : 'a t -> 'a arrayval add_seq : 'a t -> 'a sequence -> 'a t
val of_seq : 'a sequence -> 'a t
val to_seq : 'a t -> 'a sequence
val add_gen : 'a t -> 'a gen -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a genmodule Infix:sig..end
include CCRAL.Infix
type'aprinter =Format.formatter -> 'a -> unit
val print : ?sep:string -> 'a printer -> 'a t printer