c -&gt; 'b = &lt;fun&gt;

# let pure a = Some a;;
val pure : 'a -&gt; 'a option = &lt;fun&gt;

# let map f = function
  | Some value -&gt; Some (f value)
  | None -&gt; None;;
val map : ('a -&gt; 'b) -&gt; 'a option -&gt; 'b option = &lt;fun&gt;

# let flatten: 'a option option -&gt; 'a option = function
  | Some value -&gt; value
  | None -&gt; None;;
val flatten : 'a option option -&gt; 'a option = &lt;fun&gt;

# let flat_map f = compose flatten (map f);;
val flat_map : ('a -&gt; 'b option) -&gt; 'a optio