uot; -&gt;
    Some { name; details = Some { phone_number = None; address = Some &quot;123 Foo St&quot; } }
  | _ -&gt; None;;
val fetch_user : string -&gt; user option = &lt;fun&gt;

# let get_details user = user.details;;
val get_details : user -&gt; user_details option = &lt;fun&gt;

# let get_address details = details.address;;
val get_address : user_details -&gt; string option = &lt;fun&gt;

# (* With monads, getting values from deeply nested optional values is trivial: *)
  fetch_user &quot;Risto&quot