t;=&gt; (g &gt;=&gt; h)) value = ((f &gt;=&gt; g) &gt;=&gt; h) value;;
val satisfies_associative_law :
  ('a -&gt; 'b option) -&gt; ('b -&gt; 'c option) -&gt; ('c -&gt; 'd option) -&gt; 'a -&gt; bool =
  &lt;fun&gt;

# satisfies_identity_law int_of_string_opt &quot;123&quot;;;
- : bool = true
# satisfies_identity_law to_positive_int 123;;
- : bool = true
# satisfies_identity_law to_even_int 123;;
- : bool = true

# satisfies_associative_law int_of_string_opt to_positive_int to_even_int &quot;123&quot;;;
- :