Discussion:
[racket] learning recursion
Roelof Wobben
2015-02-04 18:01:25 UTC
Permalink
Hello,

I try to learn functional programming by self-study.
SO i tried to learn erlang but I have difficulties to understand recursion.

Expecially things like reverse a list.

Is racket a good language a good language to learn recursion the right way ?

Roelof

____________________
Racket Users list:
http://lists.racket-lang.org/users
Geoffrey S. Knauth
2015-02-04 18:25:45 UTC
Permalink
Is racket a good language to learn recursion the right way ?
Sure! But it's really the educational material of How to Design
Programs (HtDP) [1] that comes with DrRacket that makes the experience
of learning the "right" patterns an easier experience than it might
otherwise be. Also, this list is one of the friendliest lists you'll
find anywhere, with people of all experience levels getting along well,
where questions no matter how simple or complicated are almost always
answered by people who will point you in the right direction.

As for what language is best, though I like Racket a lot, the principles
of HtDP can be applied to many languages. When it comes to recursion,
the first thing to learn is when a recursion should stop. Then you
learn that a recursive call is a natural and succinct way to
compartmentalize computation to the thing you are looking at right now,
combined with the result of similar computations that are aggregated
elegantly through recursion. Later you learn how to make recursive
calls efficient.
--
Geoffrey S. Knauth | http://knauth.org/gsk

[1] http://www.ccs.neu.edu/home/matthias/HtDP2e/
____________________
Racket Users list:
http://lists.racket-lang.org/users
Steve Graham
2015-02-05 19:21:43 UTC
Permalink
You might consider reading/using The Little Schemer to learn recursion (and a whole lot more).

Steve
From: Geoffrey S. Knauth <***@knauth.org>
To: ***@racket-lang.org
Sent: Wednesday, February 4, 2015 10:25 AM
Subject: Re: [racket] learning recursion
Is racket a good language to learn recursion the right way ?
Sure!  But it's really the educational material of How to Design
Programs (HtDP) [1] that comes with DrRacket that makes the experience
of learning the "right" patterns an easier experience than it might
otherwise be.  Also, this list is one of the friendliest lists you'll
find anywhere, with people of all experience levels getting along well,
where questions no matter how simple or complicated are almost always
answered by people who will point you in the right direction.

As for what language is best, though I like Racket a lot, the principles
of HtDP can be applied to many languages.  When it comes to recursion,
the first thing to learn is when a recursion should stop.  Then you
learn that a recursive call is a natural and succinct way to
compartmentalize computation to the thing you are looking at right now,
combined with the result of similar computations that are aggregated
elegantly through recursion.  Later you learn how to make recursive
calls efficient.
--
Geoffrey S. Knauth | http://knauth.org/gsk

[1] http://www.ccs.neu.edu/home/matthias/HtDP2e/


____________________
  Racket Users list:
  http://lists.racket-lang.org/users
Amir Ansari
2015-02-07 07:13:28 UTC
Permalink
Get 'The Little Schemer', by Daniel P. Friedman and Matthias Felleisen. It's the classic introduction to everything about recursion. Very engaging, friendly, and funny!

Amir


On Wed, 04 Feb 2015 19:01:25 +0100
Post by Roelof Wobben
Hello,
I try to learn functional programming by self-study.
SO i tried to learn erlang but I have difficulties to understand recursion.
Expecially things like reverse a list.
Is racket a good language a good language to learn recursion the right way ?
Roelof
____________________
Racket Users list:
http://lists.racket-lang.org/users

Loading...