Commits

camlspotter committed 986cd79

typo

Comments (0)

Files changed (3)

 - Added String.is_space_or_tab and String.is_newline_or_return
 - Added Sys.with_chdir
 - Added Result.at_Error
+- Added Option.from_option and Option.(//) which are synonym of Option.default and exposed to Spotlib.Spot
 * Largely rewritten Xunix's command/shell execution.
 * Added Shell for the shell command like functions
 * Added labels to At functions.
         (* This should report the caller's location,
            but it is not possible...
         *)
+
+  let from_option = default
+  let (//) = default
 end
 
 include Pervasives
     dynamically.
 *)
 
+val fromOption : 'a t -> (unit -> 'a) -> 'a
+(** synonym of [default] *)
+
+val (//) : 'a t -> (unit -> 'a) -> 'a
+(** synonym of [default] *)
+
 val (>>=!) : 'a t -> (unit -> 'a t) -> 'a t  
 (** bindE. *)
 
 module Pervasives : sig 
   val from_Some : 'a option -> 'a
   (** may raise [Invalid_argument] *)
+
+  val from_option : 'a t -> (unit -> 'a) -> 'a
+  (** Synonym of [default]. Core's [Option.value]. Batterie's [(|?)] *)
+
+  val (//) : 'a t -> (unit -> 'a) -> 'a
+  (** Synonym of [default], inspired from Perl's (//). 
+      Core's [Option.value]. Batteries' [(|?)] *)
 end