cached

Function cached 

Source
pub fn cached<I: Eq + Hash + Clone, O: Clone>(
    func: impl for<'a> Fn(I, Recur<'a, I, O>) -> O,
) -> impl Cache<I, O>
Expand description

Memoize a function, returning an opaque object that remembers arguments and return values.