UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

15 lines (11 loc) 223 B
import { curry } from './curry.js' const Identity = x => ({ x, map : fn => Identity(fn(x)), }) function overFn( lens, fn, object ){ return lens(x => Identity(fn(x)))(object).x } export const over = curry(overFn)