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

See Stdlib.Seq.iter

val fold_left : ('a -> 'b -> 'a Alt.t) -> 'a -> 'b t -> 'a mon

See Stdlib.Seq.fold_left

val iteri : (int -> 'a -> unit Alt.t) -> 'a t -> unit mon

See Stdlib.Seq.iteri

val fold_lefti : ('b -> int -> 'a -> 'b Alt.t) -> 'b -> 'a t -> 'b mon

See Stdlib.Seq.fold_lefti

val for_all : ('a -> bool Alt.t) -> 'a t -> bool mon

See Stdlib.Seq.for_all

val exists : ('a -> bool Alt.t) -> 'a t -> bool mon

See Stdlib.Seq.exists

val find : ('a -> bool Alt.t) -> 'a t -> 'a option mon

See Stdlib.Seq.find

val find_map : ('a -> 'b option Alt.t) -> 'a t -> 'b option mon

See Stdlib.Seq.find_map

val iter2 : ('a -> 'b -> unit Alt.t) -> 'a t -> 'b t -> unit mon

See Stdlib.Seq.iter2

val fold_left2 : ('a -> 'b -> 'c -> 'a Alt.t) -> 'a -> 'b t -> 'c t -> 'a mon

See Stdlib.Seq.fold_left2

val for_all2 : ('a -> 'b -> bool Alt.t) -> 'a t -> 'b t -> bool mon

See Stdlib.Seq.for_all2

val exists2 : ('a -> 'b -> bool Alt.t) -> 'a t -> 'b t -> bool mon

See Stdlib.Seq.exists2

val init : int -> (int -> 'a Alt.t) -> 'a t

See Stdlib.Seq.init

val unfold : ('b -> ('a * 'b) option Alt.t) -> 'b -> 'a t

See Stdlib.Seq.unfold

val forever : (unit -> 'a Alt.t) -> 'a t

See Stdlib.Seq.forever

val iterate : ('a -> 'a Alt.t) -> 'a -> 'a t

See Stdlib.Seq.iterate

val map : ('a -> 'b Alt.t) -> 'a t -> 'b t

See Stdlib.Seq.map

val mapi : (int -> 'a -> 'b Alt.t) -> 'a t -> 'b t

See Stdlib.Seq.mapi

val filter : ('a -> bool Alt.t) -> 'a t -> 'a t

See Stdlib.Seq.filter

val filter_map : ('a -> 'b option Alt.t) -> 'a t -> 'b t

See Stdlib.Seq.filter_map

val scan : ('b -> 'a -> 'b Alt.t) -> 'b -> 'a t -> 'b t

See Stdlib.Seq.scan

val take_while : ('a -> bool Alt.t) -> 'a t -> 'a t

See Stdlib.Seq.take_while

val drop_while : ('a -> bool Alt.t) -> 'a t -> 'a t

See Stdlib.Seq.drop_while

val group : ('a -> 'a -> bool Alt.t) -> 'a t -> 'a t t

See Stdlib.Seq.group

val map2 : ('a -> 'b -> 'c Alt.t) -> 'a t -> 'b t -> 'c t

See Stdlib.Seq.map2

val map_product : ('a -> 'b -> 'c Alt.t) -> 'a t -> 'b t -> 'c t

See Stdlib.Seq.map_product

val partition_map : ('a -> ('b, 'c) Stdlib.Either.t Alt.t) -> 'a t -> 'b t * 'c t

See Stdlib.Seq.partition_map

val partition : ('a -> bool Alt.t) -> 'a t -> 'a t * 'a t

See Stdlib.Seq.partition