Do you know where your variables are? | |
PerlMonks |
Re^2: use Memoize;by Corion (Patriarch) |
on Jul 17, 2018 at 20:16 UTC ( [id://1218695]=note: print w/replies, xml ) | Need Help?? |
Alternatively, instead of writing your own caching scheme, you could use a proven and documented approach, and use Memoize. Also, the technical term for what you describe as "simply a mathematical function that is intended to return a result" is "pure function" or a subroutine without side-effects. Because, as the documentation of Memoize says, it will cache the results of a function for identical input values.
In Section
Meditations
|
|