Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Monadic.S2SourceThe module type for the output of the Make2 module (below).
The type of the monad that the specialised Seq variation is built upon. This type is destructively substituted by the application of the functor; it is replaced by the actual monad type passed as parameter.
The Seq-like type: identical to Stdlib.Seq.t except for mon.
This include brings all the functions from the Stdlib.Seq module but specialised to the specialised Seq variation. E.g., given module SeqMon = Make2(Mon) then the function SeqMon.map has type ('a -> 'b) -> ('a, 'e) t -> ('b, 'e) t and SeqMon.iter has type ('a -> unit) -> ('a, 'e) t -> (unit, 'e) mon.
See the documentation of Sigs2.SEQMON2ALL for more details.
val init : int -> (int -> 'a) -> ('a, 'e) tval unfold : ('b -> ('a * 'b) option) -> 'b -> ('a, 'e) tval forever : (unit -> 'a) -> ('a, 'e) tval iterate : ('a -> 'a) -> 'a -> ('a, 'e) tval empty : ('a, 'e) tval return : 'a -> ('a, 'e) tval repeat : 'a -> ('a, 'e) tval ints : int -> (int, 'e) tmodule M : sig ... endM 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 = Make2(Mon) then SeqMon.M.map has type ('a -> ('b, 'e) Mon.t) -> ('a, 'e) t -> ('b, 'e) t and SeqMon.M.iter has type ('a -> (unit, 'e) mon) -> ('a, 'e) t -> (unit, 'e) mon.
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, 'e) Mun.t) -> ('a, 'e) t -> ('b, 'e) t.
module MakeTraversors
(Alt : sig ... end)
(Ret : sig ... end)
(GlueAlt : sig ... end)
(GlueMon : sig ... end) :
sig ... endMakeTraversors is a functor similar to Make. It produces only a subset of the functions that Make does. Specifically, it produces the subset of functions that traverse a sequence (or part thereof) and return a value which is not a sequence (e.g., iter returning unit but not map returning a new sequence).