Expand description
Cache a function’s result in a map.
§Example
let mut cached_sqr = cached(|x| x * x);
assert_eq!(cached_sqr(3), 9);Functions§
- cached
- Transform a function by caching its result in a hashmap.
- cached_
ord - Transform a function by caching its result in a
BTreeMap.