package seqes

  1. Overview
  2. Docs

Monadic traversors over Stdlib.Seq.

This Make functor produces functions to traverse Stdlib.Seq sequences, when the function provided by the user is within a monad.

The Make functor does not export a new type: it only exports traversors for the existing type exported by the Stdlib. If you need tighter integration between your monad and the sequence, checkout Seqes.Monadic.

The buld of the documentation is located in the Seqes.Sigs1 module. Familiarity with the Stdlib.Seq module is also assumed.

Parameters

module Mon : sig ... end

Signature

val iter : ('a -> unit Mon.t) -> 'a Stdlib.Seq.t -> unit Mon.t

See Stdlib.Seq.iter

val fold_left : ('a -> 'b -> 'a Mon.t) -> 'a -> 'b Stdlib.Seq.t -> 'a Mon.t

See Stdlib.Seq.fold_left

val iteri : (int -> 'a -> unit Mon.t) -> 'a Stdlib.Seq.t -> unit Mon.t

See Stdlib.Seq.iteri

val fold_lefti : ('b -> int -> 'a -> 'b Mon.t) -> 'b -> 'a Stdlib.Seq.t -> 'b Mon.t

See Stdlib.Seq.fold_lefti

val for_all : ('a -> bool Mon.t) -> 'a Stdlib.Seq.t -> bool Mon.t

See Stdlib.Seq.for_all

val exists : ('a -> bool Mon.t) -> 'a Stdlib.Seq.t -> bool Mon.t

See Stdlib.Seq.exists

val find : ('a -> bool Mon.t) -> 'a Stdlib.Seq.t -> 'a option Mon.t

See Stdlib.Seq.find

val find_map : ('a -> 'b option Mon.t) -> 'a Stdlib.Seq.t -> 'b option Mon.t

See Stdlib.Seq.find_map

val iter2 : ('a -> 'b -> unit Mon.t) -> 'a Stdlib.Seq.t -> 'b Stdlib.Seq.t -> unit Mon.t

See Stdlib.Seq.iter2

val fold_left2 : ('a -> 'b -> 'c -> 'a Mon.t) -> 'a -> 'b Stdlib.Seq.t -> 'c Stdlib.Seq.t -> 'a Mon.t

See Stdlib.Seq.fold_left2

val for_all2 : ('a -> 'b -> bool Mon.t) -> 'a Stdlib.Seq.t -> 'b Stdlib.Seq.t -> bool Mon.t

See Stdlib.Seq.for_all2

val exists2 : ('a -> 'b -> bool Mon.t) -> 'a Stdlib.Seq.t -> 'b Stdlib.Seq.t -> bool Mon.t

See Stdlib.Seq.exists2