Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 chilling in the Monastery: (3)
As of 2025-06-19 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.