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 Seq.t -> unit Mon.t
val fold_left : ('a -> 'b -> 'a Mon.t) -> 'a -> 'b Seq.t -> 'a Mon.t
val iteri : (int -> 'a -> unit Mon.t) -> 'a Seq.t -> unit Mon.t
val fold_lefti : ('b -> int -> 'a -> 'b Mon.t) -> 'b -> 'a Seq.t -> 'b Mon.t
val for_all : ('a -> bool Mon.t) -> 'a Seq.t -> bool Mon.t
val exists : ('a -> bool Mon.t) -> 'a Seq.t -> bool Mon.t
val find : ('a -> bool Mon.t) -> 'a Seq.t -> 'a option Mon.t
val find_map : ('a -> 'b option Mon.t) -> 'a Seq.t -> 'b option Mon.t
val iter2 : ('a -> 'b -> unit Mon.t) -> 'a Seq.t -> 'b Seq.t -> unit Mon.t
val fold_left2 : ('a -> 'b -> 'c -> 'a Mon.t) -> 'a -> 'b Seq.t -> 'c Seq.t -> 'a Mon.t
val for_all2 : ('a -> 'b -> bool Mon.t) -> 'a Seq.t -> 'b Seq.t -> bool Mon.t
val exists2 : ('a -> 'b -> bool Mon.t) -> 'a Seq.t -> 'b Seq.t -> bool Mon.t