package seqes

  1. Overview
  2. Docs

Module Make2.MSource

M is a module which contains a specialised subset of the functions from the Stdlib.Seq module. Specifically, it contains those functions which take a function as parameter (e.g., map but not length). Moreover, those parameter functions' return type is specialised to be within the mon monad. E.g., given module SeqMon = Make2(Mon) then SeqMon.M.map has type ('a -> ('b, 'e) Mon.t) -> ('a, 'e) t -> ('b, 'e) t and SeqMon.M.iter has type ('a -> (unit, 'e) mon) -> ('a, 'e) t -> (unit, 'e) mon.

See the documentation of Sigs2.SEQMON2TRANSFORMERS for more details.

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

Innovation. Community. Security.