Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-12-28 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (179 votes), past polls