1 unstable release
new 0.1.1 | Oct 17, 2024 |
---|---|
0.1.0 |
|
#125 in Caching
233 downloads per month
7KB
55 lines
Cached Fn
Cache a function's result in a map.
Example
let mut cached_sqr = cached(|x| x * x);
assert_eq!(cached_sqr(3), 9);
lib.rs
:
Cache a function's result in a map.
Example
let mut cached_sqr = cached(|x| x * x);
assert_eq!(cached_sqr(3), 9);
Dependencies
~25KB