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

# let satisfies_identity = map id (Some 123) = Some 123;;
val satisfies_identity : bool = true

# let satisfies_composition =
  map (compose string_of_int ((+) 1)) (Some 123) =
  compose (map string_of_int) (map ((+) 1)) (Some 123);;
val satisfies_composition : bool = true</code></pre></li></ul><h4 id="magmas"><a href="#magmas" class="anchor"></a>Magmas</h4><p>Magmas are a very simple concept: i