package containers

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type !'a t = unit -> 'a option
type !'a gen = 'a t
module type S = sig ... end
val get : 'a t -> 'a option
val next : 'a t -> 'a option
val get_exn : 'a t -> 'a
val junk : 'a t -> unit
val repeatedly : (unit -> 'a) -> 'a t
val empty : 'a gen
val singleton : 'a -> 'a gen
val repeat : 'a -> 'a gen
val iterate : 'a -> ('a -> 'a) -> 'a gen
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a gen
val init : ?limit:int -> (int -> 'a) -> 'a gen
val is_empty : 'a gen -> bool
val fold : ('b -> 'a -> 'b) -> 'b -> 'a gen -> 'b
val reduce : ('a -> 'a -> 'a) -> 'a gen -> 'a
val scan : ('b -> 'a -> 'b) -> 'b -> 'a gen -> 'b gen
val iter : ('a -> unit) -> 'a gen -> unit
val iteri : (int -> 'a -> unit) -> 'a gen -> unit
val length : 'a gen -> int
val map : ('a -> 'b) -> 'a gen -> 'b gen
val append : 'a gen -> 'a gen -> 'a gen
val flatten : 'a gen gen -> 'a gen
val flat_map : ('a -> 'b gen) -> 'a gen -> 'b gen
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a gen -> bool
val take : int -> 'a gen -> 'a gen
val drop : int -> 'a gen -> 'a gen
val nth : int -> 'a gen -> 'a
val take_nth : int -> 'a gen -> 'a gen
val filter : ('a -> bool) -> 'a gen -> 'a gen
val take_while : ('a -> bool) -> 'a gen -> 'a gen
val drop_while : ('a -> bool) -> 'a gen -> 'a gen
val filter_map : ('a -> 'b option) -> 'a gen -> 'b gen
val zip_index : 'a gen -> (int * 'a) gen
val unzip : ('a * 'b) gen -> 'a gen * 'b gen
val partition : ('a -> bool) -> 'a gen -> 'a gen * 'a gen
val for_all : ('a -> bool) -> 'a gen -> bool
val exists : ('a -> bool) -> 'a gen -> bool
val min : ?lt:('a -> 'a -> bool) -> 'a gen -> 'a
val max : ?lt:('a -> 'a -> bool) -> 'a gen -> 'a
val eq : ?eq:('a -> 'a -> bool) -> 'a gen -> 'a gen -> bool
val lexico : ?cmp:('a -> 'a -> int) -> 'a gen -> 'a gen -> int
val compare : ?cmp:('a -> 'a -> int) -> 'a gen -> 'a gen -> int
val find : ('a -> bool) -> 'a gen -> 'a option
val sum : int gen -> int
val map2 : ('a -> 'b -> 'c) -> 'a gen -> 'b gen -> 'c gen
val iter2 : ('a -> 'b -> unit) -> 'a gen -> 'b gen -> unit
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a gen -> 'b gen -> 'acc
val for_all2 : ('a -> 'b -> bool) -> 'a gen -> 'b gen -> bool
val exists2 : ('a -> 'b -> bool) -> 'a gen -> 'b gen -> bool
val zip_with : ('a -> 'b -> 'c) -> 'a gen -> 'b gen -> 'c gen
val zip : 'a gen -> 'b gen -> ('a * 'b) gen
val merge : 'a gen gen -> 'a gen
val intersection : ?cmp:('a -> 'a -> int) -> 'a gen -> 'a gen -> 'a gen
val sorted_merge : ?cmp:('a -> 'a -> int) -> 'a gen -> 'a gen -> 'a gen
val sorted_merge_n : ?cmp:('a -> 'a -> int) -> 'a gen list -> 'a gen
val tee : ?n:int -> 'a gen -> 'a gen list
val round_robin : ?n:int -> 'a gen -> 'a gen list
val interleave : 'a gen -> 'a gen -> 'a gen
val intersperse : 'a -> 'a gen -> 'a gen
val product : 'a gen -> 'b gen -> ('a * 'b) gen
val group : ?eq:('a -> 'a -> bool) -> 'a gen -> 'a list gen
val uniq : ?eq:('a -> 'a -> bool) -> 'a gen -> 'a gen
val sort : ?cmp:('a -> 'a -> int) -> 'a gen -> 'a gen
val sort_uniq : ?cmp:('a -> 'a -> int) -> 'a gen -> 'a gen
val chunks : int -> 'a gen -> 'a array gen
val of_list : 'a list -> 'a gen
val to_list : 'a gen -> 'a list
val to_rev_list : 'a gen -> 'a list
val to_array : 'a gen -> 'a array
val of_array : ?start:int -> ?len:int -> 'a array -> 'a gen
val rand_int : int -> int gen
val int_range : int -> int -> int gen
module Infix : sig ... end
val (--) : int -> int -> int gen
val (>>=) : 'a gen -> ('a -> 'b gen) -> 'b gen
val pp : ?start:string -> ?stop:string -> ?sep:string -> ?horizontal:bool -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a gen -> unit
module Restart : sig ... end
val persistent : 'a t -> 'a Restart.t
val start : 'a Restart.t -> 'a t
OCaml

Innovation. Community. Security.