- Scala Design Patterns.
- Ivan Nikolov
- 51字
- 2021-08-27 19:09:50
Memoization
This design pattern helps with optimization by remembering function results, based on the inputs. This means that as long as the function is stable and will return the same result when the same parameters are passed, one can remember its results and simply return them for every consecutive identical call.