An open API service indexing awesome lists of open source software.

https://github.com/mintlu8/cached_fn

Cache a function's result in a map.
https://github.com/mintlu8/cached_fn

Last synced: 5 months ago
JSON representation

Cache a function's result in a map.

Awesome Lists containing this project

README

          

# Cached Fn

Cache a function's result in a map.

## Example

```rust
let mut cached_sqr = cached(|x| x * x);
assert_eq!(cached_sqr(3), 9);
```