deno.land / x / rambda@v9.1.1 / src / update.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { cloneList } from './_internals/cloneList.js'import { curry } from './curry.js'
export function updateFn( index, newValue, list){ const clone = cloneList(list) if (index === -1) return clone.fill(newValue, index)
return clone.fill( newValue, index, index + 1 )}
export const update = curry(updateFn)
rambda

Version Info

Tagged at
2 months ago