Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 musing on the Monastery: (8)
As of 2014-10-25 15:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (145 votes), past polls