module type S =Signature for monadssig..end
type 'a t
'a.val bind : 'a t -> ('a -> 'b t) -> 'b t
bind m f executes first m then f, using the
result of m.
val return : 'a -> 'a tval failwith : string -> 'a t
failwith msg leaves the monadic world as a consequence of
a programming accident, such as a pattern match error.
This function should not be used for exceptions, only
for fatal errors.