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

RE: Recursion is not a looping construct.

by KM (Priest)
on Jun 11, 2000 at 05:49 UTC ( [id://17565]=note: print w/replies, xml ) Need Help??


in reply to Recursion is not a looping construct.
in thread How can I add all the numbers in an array with out doing a foreach loop?

Well, I disagree with you here. And, so do the people I asked for opinions. Recursion is a looping construct. Even your explination is a loop. You can not push things onto a stack and then evaluate what is on that stack incrementally without a loop. No need to really continue this, but after trying to find anyone else I know to have the same opinion as you, I stand by everyone elses answers that this can't be done without looping, and that recursion is indeed a looping construct. Just take a pencil and paper and draw out a flow of the snippet you gave, you will see the obvious loop.

Cheers,
KM

  • Comment on RE: Recursion is not a looping construct.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-07-12 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.