UNPKG

528 Btext/coffeescriptView Raw
1{curry, partial, negate} = require "fairmont-core"
2
3eq = curry (x, y) -> x == y
4neq = curry (x, y) -> x != y
5
6gte = curry (x, y) -> y >= x
7lte = curry (x, y) -> y <= x
8gt = curry (x, y) -> y > x
9lt = curry (x, y) -> y < x
10
11add = curry (x, y) -> x + y
12sub = curry (x, y) -> y - x
13mul = curry (x, y) -> x * y
14div = curry (x, y) -> y / x
15mod = curry (x, y) -> y % x == 0
16
17even = mod 2
18odd = negate even
19
20{min, max, abs, pow} = Math
21
22module.exports = {eq, neq, gt, lt, gte, lte, add, sub, mul, div, mod,
23 even, odd, min, max, abs}