prbnmcn-basic-structures

Base package for prbnmcn-* packages
Library prbnmcn-basic-structures
type 'a t = 'a

'a t is the type of computations of type 'a

type 'a res = 'a

'a res is the outcome of running a computation of type 'a

val return : 'a -> 'a t

return x injects a value x as a computation

val bind : 'a t -> ( 'a -> 'b t ) -> 'b t

Monadic bind

val map : 'a t -> ( 'a -> 'b ) -> 'b t

Functorial map

val run : 'a t -> 'a res

Running a monadic computation

module Infix : sig ... end