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