Crates.io | cached_fn |
lib.rs | cached_fn |
version | 0.1.1 |
source | src |
created_at | 2024-10-17 10:43:02.206579 |
updated_at | 2024-10-17 10:44:09.029809 |
description | Cache a function's result in a map. |
homepage | |
repository | https://github.com/mintlu8/cached_fn |
max_upload_size | |
id | 1412932 |
size | 16,461 |
Cache a function's result in a map.
let mut cached_sqr = cached(|x| x * x);
assert_eq!(cached_sqr(3), 9);