Skip to main content
Module

x/ramda/mod.ts>memoizeWith

:ram: Practical functional Javascript
Latest
variable memoizeWith
import { memoizeWith } from "https://deno.land/x/ramda@v0.27.2/mod.ts";

Creates a new function that, when invoked, caches the result of calling fn for a given argument set and returns the result. Subsequent calls to the memoized fn with the same argument set will not result in an additional call to fn; instead, the cached result for that set of arguments will be returned.

Care must be taken when implementing key generation to avoid key collision, or if tracking references, memory leaks and mutating arguments.