Understanding recursion

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding recursion

Joe Armstrong-2
I think how we teach recursion is wrong.

Understanding recursion is really easy,
all you have to do is understand recursion.

/Joe


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Understanding recursion

Paul Barry
So... if I click on "Reply All", then this email message will itself
recur, right?  ;-)

On 19 May 2011 13:58, Joe Armstrong <[hidden email]> wrote:

> I think how we teach recursion is wrong.
>
> Understanding recursion is really easy,
> all you have to do is understand recursion.
>
> /Joe
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>
>



--
Paul Barry, w: http://paulbarry.itcarlow.ie, e: [hidden email]
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Understanding recursion

Alexander Krasnukhin
Just configure simplest auto answer in your mail client and write email to yourself.

On Thu, May 19, 2011 at 3:22 PM, Paul Barry <[hidden email]> wrote:
So... if I click on "Reply All", then this email message will itself
recur, right?  ;-)

On 19 May 2011 13:58, Joe Armstrong <[hidden email]> wrote:
> I think how we teach recursion is wrong.
>
> Understanding recursion is really easy,
> all you have to do is understand recursion.
>
> /Joe
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>
>



--
Paul Barry, w: http://paulbarry.itcarlow.ie, e: [hidden email]
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



--
Regards,
Alexander


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Understanding recursion

pmacgown

And using tail recursion, I don't have to have an infinite number of quoted quotes.  I just have to rewrite the original email and send it...only this time, it will be from Nairobi asking for banking account information because I have updated code on the fly.

--Peter


----- Original Message -----
From: "Alexander Krasnukhin" <[hidden email]>
To: "Paul Barry" <[hidden email]>
Cc: "Erlang" <[hidden email]>
Sent: Thursday, May 19, 2011 9:32:28 AM
Subject: Re: [erlang-questions] Understanding recursion

Just configure simplest auto answer in your mail client and write email to yourself.

On Thu, May 19, 2011 at 3:22 PM, Paul Barry <[hidden email]> wrote:
So... if I click on "Reply All", then this email message will itself
recur, right?  ;-)

On 19 May 2011 13:58, Joe Armstrong <[hidden email]> wrote:
> I think how we teach recursion is wrong.
>
> Understanding recursion is really easy,
> all you have to do is understand recursion.
>
> /Joe
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>
>



--
Paul Barry, w: http://paulbarry.itcarlow.ie, e: [hidden email]
Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



--
Regards,
Alexander


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Understanding recursion

Henning Diedrich
In reply to this post by Joe Armstrong-2
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
demonstrate.

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).

Henning

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.
>
> /Joe
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120602/005ec925/attachment.html>

Reply | Threaded
Open this post in threaded view
|

Understanding recursion

黃耀賢 (Yau-Hsien Huang)-2
In reply to this post by Paul Barry
No. There shell be a rule like "All receivers of the mail replies to all."
:D

On Thu, May 19, 2011 at 9:22 PM, Paul Barry <paul.james.barry>wrote:

> So... if I click on "Reply All", then this email message will itself
> recur, right?  ;-)
>
> On 19 May 2011 13:58, Joe Armstrong <erlang> wrote:
> > I think how we teach recursion is wrong.
> >
> > Understanding recursion is really easy,
> > all you have to do is understand recursion.
> >
> > /Joe
> >
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions
> > http://erlang.org/mailman/listinfo/erlang-questions
> >
> >
>
>
>
> --
> Paul Barry, w: http://paulbarry.itcarlow.ie, e: paul.barry
> Lecturer, Computer Networking: Institute of Technology, Carlow, Ireland.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions
> http://erlang.org/mailman/listinfo/erlang-questions
>



--

Best Regards.

--- Y-H. H.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120603/4a27c759/attachment.html>

Reply | Threaded
Open this post in threaded view
|

Understanding recursion

Francesco Mazzoli-2
But once you've received three copies of this thread, stop replying.

On 03/06/2012 16:14, ??? (Yau-Hsien Huang) wrote:

> No. There shell be a rule like "All receivers of the mail replies to
> all." :D
>
> On Thu, May 19, 2011 at 9:22 PM, Paul Barry
> <paul.james.barry <mailto:paul.james.barry>> wrote:
>
>     So... if I click on "Reply All", then this email message will itself
>     recur, right?  ;-)
>
>     On 19 May 2011 13:58, Joe Armstrong <erlang
>     <mailto:erlang>> wrote:
>     > I think how we teach recursion is wrong.
>     >
>     > Understanding recursion is really easy,
>     > all you have to do is understand recursion.
>     >
>     > /Joe
>     >
>     >
>     > _______________________________________________
>     > erlang-questions mailing list
>     > erlang-questions <mailto:erlang-questions>
>     > http://erlang.org/mailman/listinfo/erlang-questions
>     >
>     >
>
>
>
>     --
>     Paul Barry, w: http://paulbarry.itcarlow.ie, e:
>     paul.barry <mailto:paul.barry>
>     Lecturer, Computer Networking: Institute of Technology, Carlow,
>     Ireland.
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions <mailto:erlang-questions>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
> --
>
> Best Regards.
>
> --- Y-H. H.
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions
> http://erlang.org/mailman/listinfo/erlang-questions

--
Erlang Solutions Ltd.
http://www.erlang-solutions.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120603/0bae3016/attachment.html>