Commits

camlspotter committed c482e9c

added Base.flip and flipf

Comments (0)

Files changed (3)

 - Lazy.(!!) is also in Lazy.Open(!!)
 - Unix.mkdir can be recursive now
 - Added Shell, commands via shell commands
+- Added Base.flipf and Base.filp
 * Largely rewritten Xunix's command/shell execution.
 * Added Shell for the shell command like functions
 * Added labels to At functions.
 
 let (|-) res f = f res; res
 
+let flip f x y = f y x
 let (~~) g ~f = g f
+let flipf = (~~)
 val (|-) : 'a -> ('a -> 'b) -> 'a
 (** "tee". [v |-- f] is [v] but [f v] is run before [v] is returned *)
 
+val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
+(** [flip] of Haskell *)
+
 val (~~) : ('a -> 'b) -> f:'a -> 'b
+val flipf : ('a -> 'b) -> f:'a -> 'b
 (** Super [flip] of Haskell. The first argument is labeled and becomes commutative. *)
 
 (** {6 Imperative operations } *)