package seqes

  1. Overview
  2. Docs

Other functions

Sequences also have functions that do not take any caller-provided function as arguments. For these functions, only the monad that the sequence is specialised to matters.

In addition to all those functions, the SEQMON1ALL module signature also includes the SEQMON1TRANSFORMERS module signature, but specialised with the type 'a callermon := 'a. All the functors that produce modules with this signature also produce all the transformers and traversors that operate with no caller monad.

type 'a mon

mon is the type constructor for the monad used in the sequence.

The type is meant to be substituted by the functor that produces modules of following this signature.

type 'a t

t is the type constructor for the sequence.

The type is meant to be substituted by the functor that produces modules of following this signature.

val iter : ('a -> unit) -> 'a t -> unit mon
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a mon
val iteri : (int -> 'a -> unit) -> 'a t -> unit mon
val fold_lefti : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b mon
val for_all : ('a -> bool) -> 'a t -> bool mon
val exists : ('a -> bool) -> 'a t -> bool mon
val find : ('a -> bool) -> 'a t -> 'a option mon
val find_map : ('a -> 'b option) -> 'a t -> 'b option mon
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit mon
val fold_left2 : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b t -> 'c t -> 'a mon
val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool mon
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool mon
val init : int -> (int -> 'a) -> 'a t
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t
val forever : (unit -> 'a) -> 'a t
val iterate : ('a -> 'a) -> 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val filter : ('a -> bool) -> 'a t -> 'a t
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t
val take_while : ('a -> bool) -> 'a t -> 'a t
val drop_while : ('a -> bool) -> 'a t -> 'a t
val group : ('a -> 'a -> bool) -> 'a t -> 'a t t
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val partition_map : ('a -> ('b, 'c) Either.t) -> 'a t -> 'b t * 'c t
val partition : ('a -> bool) -> 'a t -> 'a t * 'a t
val is_empty : 'a t -> bool mon
val uncons : 'a t -> ('a * 'a t) option mon
val length : 'a t -> int mon
val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool mon
val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int mon
val empty : 'a t
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val repeat : 'a -> 'a t
val cycle : 'a t -> 'a t
val take : int -> 'a t -> 'a t
val drop : int -> 'a t -> 'a t
val memoize : 'a t -> 'a t
val once : 'a t -> 'a t
val transpose : 'a t t -> 'a t t
val append : 'a t -> 'a t -> 'a t
val concat : 'a t t -> 'a t
val flat_map : ('a -> 'b t) -> 'a t -> 'b t
val concat_map : ('a -> 'b t) -> 'a t -> 'b t
val zip : 'a t -> 'b t -> ('a * 'b) t
val interleave : 'a t -> 'a t -> 'a t
val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t
val product : 'a t -> 'b t -> ('a * 'b) t
val unzip : ('a * 'b) t -> 'a t * 'b t
val split : ('a * 'b) t -> 'a t * 'b t
val of_dispenser : (unit -> 'a option mon) -> 'a t
val to_dispenser : 'a t -> unit -> 'a option mon
val ints : int -> int t
val of_seq : 'a Seq.t -> 'a t
OCaml

Innovation. Community. Security.