Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Who's a thief? (recursion limitations)

by sleepingsquirrel (Hermit)
on Jan 14, 2005 at 18:29 UTC ( #422338=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    {
        $_[0]>0 ? deep($_[0]-1) : "done\n";
    }
    
  2. or download this
    #!/usr/bin/perl -w
    
    ...
    print fib($n)."\ncount = $count\n";
    
    sub fib { $count++; $_[0]<2 ? 1 : fib($_[0]-2) + fib($_[0]-1) }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2019-10-16 20:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?