cached_fn

Crates.iocached_fn
lib.rscached_fn
version0.1.1
sourcesrc
created_at2024-10-17 10:43:02.206579
updated_at2024-10-17 10:44:09.029809
descriptionCache a function's result in a map.
homepage
repositoryhttps://github.com/mintlu8/cached_fn
max_upload_size
id1412932
size16,461
Mincong Lu (mintlu8)

documentation

README

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);
Commit count: 3

cargo fmt