moy-fp
Version:
A functional programming library.
14 lines (12 loc) • 290 B
JavaScript
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