UNPKG

moy-fp

Version:
20 lines (17 loc) 401 B
import __ from '../../src/Function/__' import lensProp from '../../src/Object/lensProp' /** * Lens s a -> s -> a * Lens s a = Functor f => (a -> f a) -> s -> f s */ import view from '../../src/Object/view' test('view(not using __)', () => { expect( view(lensProp('a'))({a: 1}) ).toBe(1) }) test('view(not using __)', () => { expect( view(__, {a: 1})(lensProp('a')) ).toBe(1) })