Commits

camlspotter committed b08772f

added from

Comments (0)

Files changed (2)

     | Some v -> f v
     | None -> None
 end)
+
+let from def = function
+  | None -> def
+  | Some v -> v
 include Monad_intf.T with type 'a t = 'a option
+
+val from : 'a -> 'a t -> 'a
+  (** Haskell's fromMaybe *)