File: fun.ml

package info (click to toggle)
xen-api-libs 0.5.2-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,940 kB
  • sloc: ml: 13,925; sh: 2,930; ansic: 1,699; makefile: 1,240; python: 83
file content (22 lines) | stat: -rw-r--r-- 320 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22


(* just forgets it's second argument: *)
let const a b = a

let uncurry f (a,b) = f a b

let id a = a

let flip f a b = f b a

let on op f x y = op (f x) (f y)

let comp f g x = f (g x)
let (++) f g x = comp f g x

let comp2 f g a b = f (g a b)
let (+++) f g a b = comp2 f g a b

let (|>) a f = f a

let ($) f a = f a