Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

memoize

memoize

(MM 
type
:
Type, T 
type
:
Type, R 
type
:
Type, f Unary R T)
 => 
Unary R T
memoize `f`.
wraps f so that f will only be called once for every unique input.

The term "memoization" was coined by Donald Michie in 1968 and
is derived from the Latin word "memorandum" ("to be remembered"),
usually truncated as "memo" in American English, and thus carries
the meaning of "turning a function into something to be remembered".
https://en.wikipedia.org/wiki/Memoization

example:

Type Parameters

0.095dev (2025-08-15 12:02:22 GIT hash 301b5b75e77076d091b38f555473f9f0e31e5b5c built by fridi@fzen)