Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Reminder to self: must use Memoize more often!

by tobyink (Abbot)
on Jan 12, 2013 at 14:40 UTC ( #1013043=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @fib6_cache;
    sub fib6 {
    ...
            : ( $fib6_cache[ $n-1 ] //= fib6($n-1) )
            + ( $fib6_cache[ $n-2 ] //= fib6($n-2) );
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2015-07-30 09:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls