https://github.com/ktonon/elm-memo-pure
Single argument function memoization in pure elm
https://github.com/ktonon/elm-memo-pure
elm memoization
Last synced: 4 months ago
JSON representation
Single argument function memoization in pure elm
- Host: GitHub
- URL: https://github.com/ktonon/elm-memo-pure
- Owner: ktonon
- Created: 2017-08-01T22:52:15.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-02T00:19:43.000Z (almost 8 years ago)
- Last Synced: 2025-01-14T10:26:53.892Z (6 months ago)
- Topics: elm, memoization
- Language: Elm
- Homepage: http://package.elm-lang.org/packages/ktonon/elm-memo-pure/latest
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# elm-memo-pure
[](http://package.elm-lang.org/packages/ktonon/elm-memo-pure/latest)
[](https://circleci.com/gh/ktonon/elm-memo-pure)Single argument function memoization in pure elm.
Motivated by the [deprecation of elm-lang/lazy][]. This library is inspired by [eeue56/elm-lazy][] in that it makes memoization explicit. The memoized function is encapsulated as a `Memo`. Calling a memoized function returns both the result of the original function, and a new `Memo` containing the possibly newly cached result.
See the [documentation][] for examples.
[deprecation of elm-lang/lazy]:https://github.com/elm-lang/lazy/commit/c9c3f8525d22978cd7ee6e463ebf208f30fa1f91
[documentation]:http://package.elm-lang.org/packages/ktonon/elm-memo-pure/latest/Memo
[eeue56/elm-lazy]:http://package.elm-lang.org/packages/eeue56/elm-lazy/latest