E.Option
Option events
on_some e
is e
when Some _
occurs:
on_some e
]t = Some v
if [e
]t = Some (Some v)
on_some e
]t = None
otherwise.value e default
is default
when e
occurs with None
:
value e ~default
]t = None
if [e
]t = None
value e ~default
]t = Some v
if [e
]t = Some (Some v)
value e ~default
]t =
[default
]t if [e
]t = Some None
bind e f
is map (fun v -> Option.bind v f) e
.