Skip to main content
Module

x/rambda/source/over.js

Faster and smaller alternative to Ramda
Go to Latest
File
import {curry} from './curry'
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)