fix
[camlunity.git] / prelude.ml
blob1a555653f37316d409dc0595d3b1eb7e9e404ae3
1 (** Useful shortcuts *)
3 let (&) f g = fun x -> f (g x)
4 let (>>) x f = f x
6 external id : 'a -> 'a = "%identity"
7 let flip f x y = f y x
8 let some x = Some x
9 let catch f x = try Some (f x) with _ -> None
11 let apply2 f = fun (x,y) -> f x, f y
12 let fail fmt = Printf.ksprintf failwith fmt
13 (* let println = print_endline *)