import { type Update } from "https://deno.land/x/rimbu@0.13.5/core/main/index.ts";
A value of type T, or a function taking a value of type T and returning a new value of type T.
import { Update } from "https://deno.land/x/rimbu@0.13.5/core/main/index.ts";
Returns the result of given update
parameter, where it can either directly give a new value,
or it is a function receiving the given value
, and returns a new value.
Examples
Example 1
Example 1
Update(1, 2) // => 2
Update(1, () => 10) // => 10
Update(1, v => v + 1) // => 2