moy-fp
Version:
A functional programming library.
18 lines (15 loc) • 338 B
JavaScript
import __ from '../../src/Function/__'
/**
* (a -> Boolean) -> [a] -> [a]
*/
import reject from '../../src/List/reject'
test('reject(not using __)', () => {
expect(
reject(x => x > 2)([1, 2, 3, 4])
).toEqual([1, 2])
})
test('reject(using __)', () => {
expect(
reject(__, [1, 2, 3, 4])(x => x > 2)
).toEqual([1, 2])
})