UNPKG

moy-fp

Version:
18 lines (15 loc) 344 B
import __ from '../../src/Function/__' /** * (a -> Boolean) -> [a] -> [a] */ import filter from '../../src/List/filter' test('filter(not using __)', () => { expect( filter(x => x > 1)([1, 2, 3, 4]) ).toEqual([2, 3, 4]) }) test('filter(using __)', () => { expect( filter(__, [1, 2, 3, 4])(x => x > 1) ).toEqual([2, 3, 4]) })