import { adjust } from "https://deno.land/x/fae@v1.1.1/mod.ts";
Applies a given function fn
at given index
of list
,
returning a new copy of list
with element at index
replaced with
return value of fn
.
Fae.adjust(2, Fae.add(1), [0, 1, 2, 3]) // [0, 1, 3, 3]
Fae.adjust(-3, Fae.add(1), [0, 1, 2, 3]) // [0, 2, 2, 3]