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, 'e) Mun.t) -> ('a, 'e) t -> ('b, 'e) t.

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

See the documentation of Sigs2.SEQMON2TRANSFORMERS for more details.

Parameters

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

Signature

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

Innovation. Community. Security.