Legend:
Library
Module
Module type
Parameter
Class
Class type
Traversors
A traversor is a function that traverses a sequence, applying a caller-provided function on the sequence's elements. E.g., iter.
A traversor may traverse only a portion of the sequence. E.g., for_all.
The type of traversor mentions two distinct monad types:
'a mon: the monad that the sequence is specialised to
'a callermon: the monad that the caller-provided functions use
These two monad types can be different. The main use for these types being distinct is to provide both plain-traversors (e.g., the plain-iter has type ('a -> unit) -> 'a t -> unit mon) and mon-traversors (e.g., the mon-iter has type ('a -> unit mon) -> 'a t -> unit mon). Plain-traversors are obtained with type 'a callermon := 'a whereas mon-traversors are obtained with type 'a callermon := 'a mon.
There are more advanced use for tiers of monads. See examples/seqlist/seqlist.ml for an advanced example involving List and Option.
type'a callermon
callermon is the type constructor for the monad used in caller-provided functions.
The type is meant to be substituted by the functor that produces modules following this signature.
type'a mon
mon is the type constructor for the monad used in the sequence.
The type is meant to be substituted by the functor that produces modules of following this signature.
type'a t
t is the type constructor for the sequence.
The type is meant to be substituted by the functor that produces modules of following this signature.