[erlang-questions] Understanding recursion
Sat Jun 2 01:47:22 CEST 2012
I second the premise.
But the 0-case is missing. You basically proposed:
grok(understood) -> ok.
grok(Prereq) -> grok(Prereq).
Which is a dead loop for Prereq /= understood, as the jokes it inspired
There is hope though, I was allowed to hear the sense of wonder first
hand when a CS student discovered that on machine code level recursions
really become iterations. I am pretty sure the newest generation of
programmers have recursion hardwired now, for skipping all the low level
stuff and starting out with functional languages (not kidding).
On 5/19/11 2:58 PM, Joe Armstrong wrote:
> I think how we teach recursion is wrong.
> Understanding recursion is really easy,
> all you have to do is understand recursion.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions