Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Functional Programming without recursion?

Name: Anonymous 2011-06-04 23:39

I'm really interested in functional programming and I've been learning about it for a while a quite a while now but I've hit a subject which has left me stumped. That is recursion. I mean fucking hell, I can't figure it out! When I was learning how to code I was seeing nothing but for loops in other peoples code so that's how I do things. For loops everywhere! Hell I barely know how to use a while loop. Can someone tell me if there's a point to functional programming without recursion? Can you use iteration? Maybe you can explain recursion or link me to good examples because I sure haven't come across any.

Name: Anonymous 2011-06-05 0:11

>>2

Thanks.

So if I'm understanding this recursion keeps calling itself until it has a value. When it has that value it goes up the stack? So essentially it's like calling the function twice? Once without the value, just telling the computer to come back to it once it has a value. And once it actually has the value? MIND FUCK MIND FUCK

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List