package alba

  1. Overview
  2. Docs

Result Monad, satisfying the complete monadic interface as described in Module_types.MONAD.

Parameters

Signature

type error = Error.t
type 'a t = ('a, error) Stdlib.result
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>=>) : ('a -> 'b t) -> ('b -> 'c t) -> 'a -> 'c t
val map : ('a -> 'b) -> 'a t -> 'b t
val join : 'a t t -> 'a t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val throw : error -> 'a t
val catch : 'a t -> (error -> 'a t) -> 'a t
val continue : 'a t -> ('a -> 'r) -> (error -> 'r) -> 'r
OCaml

Innovation. Community. Security.