package gen

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

Innovation. Community. Security.