Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re: use Memoize;
in thread use Memoize;

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.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1218695]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found