package orsetto

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A module type that defines the core monad functions.

type +'r t

The abstract type of monad with a parameter for its return type.

val return : 'r -> 'r t

Use return a to apply the binding to a.

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

Use bind m f to bind f to the value returned by m.

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

Use map m f to return the result of applying f to the value returned by m.

module Infix : Infix with type 'r t := 'r t

Open Infix to include the infix monad operators.

val disregard : 'r t -> unit t

Use disregard m to ignore the value returned by m and apply the unit value to the bound function.