package seqes

  1. Overview
  2. Docs

MakeTraversors is a functor similar to Make. It produces only a subset of the functions that Make does. Specifically, it produces the subset of functions that traverse a sequence (or part thereof) and return a value which is not a sequence (e.g., iter returning unit but not map returning a new sequence).

In this subset it is possible to mix the monad in more complex ways. And thus the monad-combining machinery provided as functor parameter is more complex.

See examples/ for use.

See the documentation of Sigs1.SEQMON1TRAVERSORS for more details.

Parameters

module Alt : sig ... end
module Ret : sig ... end
module GlueAlt : sig ... end
module GlueMon : sig ... end

Signature

val iter : ('a -> unit Alt.t) -> 'a t -> unit Ret.t
val fold_left : ('a -> 'b -> 'a Alt.t) -> 'a -> 'b t -> 'a Ret.t
val iteri : (int -> 'a -> unit Alt.t) -> 'a t -> unit Ret.t
val fold_lefti : ('b -> int -> 'a -> 'b Alt.t) -> 'b -> 'a t -> 'b Ret.t
val for_all : ('a -> bool Alt.t) -> 'a t -> bool Ret.t
val exists : ('a -> bool Alt.t) -> 'a t -> bool Ret.t
val find : ('a -> bool Alt.t) -> 'a t -> 'a option Ret.t
val find_map : ('a -> 'b option Alt.t) -> 'a t -> 'b option Ret.t
val iter2 : ('a -> 'b -> unit Alt.t) -> 'a t -> 'b t -> unit Ret.t
val fold_left2 : ('a -> 'b -> 'c -> 'a Alt.t) -> 'a -> 'b t -> 'c t -> 'a Ret.t
val for_all2 : ('a -> 'b -> bool Alt.t) -> 'a t -> 'b t -> bool Ret.t
val exists2 : ('a -> 'b -> bool Alt.t) -> 'a t -> 'b t -> bool Ret.t
OCaml

Innovation. Community. Security.