moy-fp
Version:
A functional programming library.
18 lines (15 loc) • 302 B
JavaScript
import __ from '../../src/Function/__'
/**
* (b -> c) -> (a -> b) -> a -> c
*/
import o from '../../src/Function/o'
test('o(not using __)', () => {
expect(
o(x => x * 3, x => x + 1, 3)
).toBe(12)
})
test('o(using __)', () => {
expect(
o(x => x * 3, __, 3)(x => x + 1)
).toBe(12)
})