UNPKG

moy-fp

Version:
25 lines (20 loc) 496 B
import __ from '../../src/Function/__' /** * Number -> a -> [a] -> [a] */ import update from '../../src/List/update' test('update(not using __), positive number', () => { expect( update(1)(2)([1, 3, 4, 5]) ).toEqual([1, 2, 4, 5]) }) test('update(not using __), negative number', () => { expect( update(-2)(2)([1, 3, 4, 5]) ).toEqual([1, 3, 2, 5]) }) test('update(using __), positive number', () => { expect( update(1, __, [1, 3, 4, 5])(2) ).toEqual([1, 2, 4, 5]) })