import { Order, identity, always, ... } from 'purify-ts/Function'
[1, 2, 3, 4].map(always(0))
➔
[0, 0, 0, 0]
const sum3 = (
x: number, y: number, z: number
) => x + y + z
const curriedSum3 = curry(sum3)
➔
curriedSum3(1) // (y: number, z: number) => number
curriedSum3(1, 2) // (z: number) => number
curriedSum3(1, 2, 3) // number
curriedSum3(1)(2)(3) // number
curriedSum3(1, 2)(3) // number
compare(1, 10)
compare('a', 'a')
compare(10, 1)
➔
➔
➔
Order.LT
Order.EQ
Order.GT
orderToNumber(Order.LT)
orderToNumber(Order.EQ)
orderToNumber(Order.GT)
➔
➔
➔
-1
0
1