UNPKG

rambdax

Version:

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

14 lines (10 loc) 212 B
import { curry } from './curry' function updateFn( index, newValue, list ){ const arrClone = list.slice() return arrClone.fill( newValue, index, index + 1 ) } export const update = curry(updateFn)