package seqes

  1. Overview
  2. Docs

Make is a functor to produce further M-like modules, but with parameter functions returning into a different monad. E.g., given module SeqMon = Make(Mon) and module SeqMonMun = SeqMon.Make(Mun) then SeqMonMun.map has type ('a -> 'b Mun.t) -> 'a t -> 'b t.

Note that the functor parameter includes the necessary machinery to bundle the two monads together.

See the documentation of Sigs1.SEQMON1TRANSFORMERS for more details.

Parameters

module Alt : sig ... end
module Glue : sig ... end

Signature

Any monad that we can use to produce transformers, we can also use to produce traversors. Thus, SEQMON1TRANSFORMERS includes SEQMON1TRAVERSORS and all the functors producing transformer also produce traversors.

val iter : ('a -> unit Alt.t) -> 'a t -> unit Mon.t
val fold_left : ('a -> 'b -> 'a Alt.t) -> 'a -> 'b t -> 'a Mon.t
val iteri : (int -> 'a -> unit Alt.t) -> 'a t -> unit Mon.t
val fold_lefti : ('b -> int -> 'a -> 'b Alt.t) -> 'b -> 'a t -> 'b Mon.t
val for_all : ('a -> bool Alt.t) -> 'a t -> bool Mon.t
val exists : ('a -> bool Alt.t) -> 'a t -> bool Mon.t
val find : ('a -> bool Alt.t) -> 'a t -> 'a option Mon.t
val find_map : ('a -> 'b option Alt.t) -> 'a t -> 'b option Mon.t
val iter2 : ('a -> 'b -> unit Alt.t) -> 'a t -> 'b t -> unit Mon.t
val fold_left2 : ('a -> 'b -> 'c -> 'a Alt.t) -> 'a -> 'b t -> 'c t -> 'a Mon.t
val for_all2 : ('a -> 'b -> bool Alt.t) -> 'a t -> 'b t -> bool Mon.t
val exists2 : ('a -> 'b -> bool Alt.t) -> 'a t -> 'b t -> bool Mon.t
val init : int -> (int -> 'a Alt.t) -> 'a t
val unfold : ('b -> ('a * 'b) option Alt.t) -> 'b -> 'a t
val forever : (unit -> 'a Alt.t) -> 'a t
val iterate : ('a -> 'a Alt.t) -> 'a -> 'a t
val map : ('a -> 'b Alt.t) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b Alt.t) -> 'a t -> 'b t
val filter : ('a -> bool Alt.t) -> 'a t -> 'a t
val filter_map : ('a -> 'b option Alt.t) -> 'a t -> 'b t
val scan : ('b -> 'a -> 'b Alt.t) -> 'b -> 'a t -> 'b t
val take_while : ('a -> bool Alt.t) -> 'a t -> 'a t
val drop_while : ('a -> bool Alt.t) -> 'a t -> 'a t
val group : ('a -> 'a -> bool Alt.t) -> 'a t -> 'a t t
val map2 : ('a -> 'b -> 'c Alt.t) -> 'a t -> 'b t -> 'c t
val map_product : ('a -> 'b -> 'c Alt.t) -> 'a t -> 'b t -> 'c t
val partition_map : ('a -> ('b, 'c) Either.t Alt.t) -> 'a t -> 'b t * 'c t
val partition : ('a -> bool Alt.t) -> 'a t -> 'a t * 'a t