Commits

camlspotter committed 4b0203b

added (*>) for >>> in Haskell

Comments (0)

Files changed (2)

 external (|>) : 'a -> ('a -> 'b) -> 'b =  "%revapply"
 
 let ( ** ) f g = fun x -> f (g x)
+let ( *> ) f g = fun x -> g (f x)
 external power : float -> float -> float = "caml_power_float" "pow" "float"
 
 external id : 'a -> 'a = "%identity"
 (** Functional composition. Haskell's (.) 
     Use [power] if you want to use the original [( ** )].
 *)
+val ( *> ) : ('a -> 'b) -> ('b -> 'c) -> ('a -> 'c)
+(** Functional composition in swapped order. Haskell's (>>>) *)
+
 external power : float -> float -> float = "caml_power_float" "pow" "float"
 
 external (&) : ('a -> 'b) -> 'a -> 'b = "%apply"