package seqes

  1. Overview
  2. Docs

Module Make1.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 = Make(Mon) then SeqMon.M.map has type ('a -> 'b Mon.t) -> 'a t -> 'b t and SeqMon.M.iter has type ('a -> unit mon) -> 'a t -> unit mon.

See the documentation of Sigs1.SEQMON1TRANSFORMERS for more details.

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.

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

Innovation. Community. Security.