jon.recoil.org

Module Stdlib.OptionSource

Extensions to the Option module

Sourcetype 'a t = 'a option
Sourceval first_some : 'a option -> (unit -> 'a option) -> 'a option
Sourceval print : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit
Sourceval map_sharing : ('a -> 'a) -> 'a option -> 'a option

map_sharing f a is map f a. If a is None or it is Some e and f e == e then map_sharing f a == a.