UNPKG

moy-fp

Version:
19 lines (17 loc) 417 B
import __ from '../../src/Function/__' import lensProp from '../../src/Object/lensProp' /** * Lens s a -> a -> s -> s * Lens s a = Functor f => (a -> f a) -> s -> f s */ import set from '../../src/Object/set' test('set(not using __)', () => { expect( set(lensProp('a'))(2)({a: 1}) ).toEqual({a: 2}) }) test('set(using __)', () => { expect( set(lensProp('a'), __, {a: 1})(2) ).toEqual({a: 2}) })