UNPKG

moy-fp

Version:
14 lines (12 loc) 290 B
import curry from '../Function/curry' import lens from './lens' import path from './path' import assocPath from './assocPath' /** * [k] -> Lens s a * Lens s a = Functor f => (a -> f a) -> s -> f s */ const lensPath = curry( p => lens(path(p))(assocPath(p)) ) export default lensPath