package travesty

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

Extend creates Extensions for a Monad.S.

Parameters

module M : Base.Monad.S

Signature

val when_m : Base.bool -> f:(Base.unit -> Base.unit M.t) -> Base.unit M.t

when_m predicate ~f returns f () when predicate is true, and return () otherwise.

val unless_m : Base.bool -> f:(Base.unit -> Base.unit M.t) -> Base.unit M.t

unless_m predicate ~f returns f () when predicate is false, and return () otherwise.

OCaml

Innovation. Community. Security.