x
  | _ -&gt; None;;
val to_positive_int : int -&gt; int option = &lt;fun&gt;

# let to_even_int = function
  | x when x mod 2 = 0 -&gt; Some x
  | _ -&gt; None;;
val to_even_int : int -&gt; int option = &lt;fun&gt;

# let empty = Option.Monad.pure;;
val empty : 'a -&gt; 'a option = &lt;fun&gt;

# let satisfies_identity_law f value = (f &gt;=&gt; empty) value = f value;;
val satisfies_identity_law : ('a -&gt; 'b option) -&gt; 'a -&gt; bool = &lt;fun&gt;

# let satisfies_associative_law f g h value =
  (f &g