package base
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=2100b0ed13fecf43be86ed45c5b2cc4d
sha512=628610caff7e124631870fa1e29661caac28bdfdb18750ee43b868037da3d65d6dd9023b4be7c4c52405679efb5e865a6632d95606a22b28a36636a6bf706ef3
doc/base/Base/Monad/index.html
Module Base.Monad
Source
A monad is an abstraction of the concept of sequencing of computations. A value of type 'a monad
represents a computation that returns a value of type 'a
.
Multi parameter monad. The second parameter gets unified across all the computation. This is used to encode monads working on a multi parameter data structure like (('a,'b) result
).
Multi parameter monad. The second and third parameters get unified across all the computation.
Indexed monad, in the style of Atkey. The second and third parameters are composed across all computation. To see this more clearly, you can look at the type of bind:
Multi parameter monad. The second parameter gets unified across all the computation. This is used to encode monads working on a multi parameter data structure like (('a,'b) result
).
Same as Infix
, except the monad type has two arguments. The second is always just passed through.
Same as Infix, except the monad type has three arguments. The second and third are always just passed through.
Same as Infix
, except the monad type has three arguments. The second and third are composed across all computation.
Same as Infix
, except the monad type has two arguments. The second is always just passed through.
Opening a module of this type allows one to use the %bind
and %map
syntax extensions defined by ppx_let, and brings return
into scope.
Opening a module of this type allows one to use the %bind
and %map
syntax extensions defined by ppx_let, and brings return
into scope.
The same as S
except the monad type has two arguments. The second is always just passed through.
The same as S
except the monad type has three arguments. The second and third are always just passed through.
The same as S
except the monad type has three arguments. The second and third are composed across all computation.
The same as S
except the monad type has two arguments. The second is always just passed through.
The same as S
except the monad type has two arguments. The second is always just passed through.
The same as S
except the monad type has three arguments. The second and third are always just passed through.
module Make_indexed
(X : Basic_indexed) :
S_indexed with type ('a, 'd, 'e) t := ('a, 'd, 'e) X.t
The same as S
except the monad type has three arguments. The second and third are composed across all computation.
The same as S
except the monad type has two arguments. The second is always just passed through.
Define a monad through an isomorphism with an existing monad. For example:
The same as S
except the monad type has two arguments. The second is always just passed through.
module Of_monad3
(Monad : S3)
(M : sig ... end) :
S3 with type ('a, 'b, 'c) t := ('a, 'b, 'c) M.t
The same as S
except the monad type has three arguments. The second and third are always just passed through.