[plt-scheme] HtDP Exercise 12.4.2 - To the authors of HtDP

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Dec 2 22:50:44 EST 2009

Thank you for this message. I feel like printing it out, framing it,
and putting it on my wall.

Robby

On Tue, Dec 1, 2009 at 9:52 AM, artificial <4rt.f15h at gmail.com> wrote:
> Hello
>
> Since I got interested in functional programming, I did a little
> research in the web, downloaded DrScheme and started to work through
> HtDP a few days ago. I know imperative languages (mostly C, Java,
> Ruby) fairly well, so I skimmed through the book, yet did all the
> exercises that contained writing scheme code.
>
> Then I encountered exercise 12.4.2. I read it, started to code and
> failed terribly. I couldn't get it right and got frustrated.
>
> So I fired up chrome and googled for a solution, but I couldn't find
> one. Just a few threads on this mailing list which didn't provide a
> solution but emphasized the usage of "design recipes". I googled some
> more for permutations, learned a little about the math background -
> which was interesting but didn't help me to solve 12.4.2, and found
> video lectures of Jerry Cain of Stanford which contained a spectacular
> permutation function but in the end didn't help me either.
>
> In the end, I started over with HtDP and learned every little bit
> about "design recipes". Then I took pen and paper and designed the
> arrangements function using what I have learned. After that I fired up
> DrScheme, entered the 4 functions (including the given function
> arrangements) and check-expects with the examples for each function I
> came up with, and guess what? It worked right away :-D (this was a few
> minutes ago).
>
> Thank you very much. I think learned my lesson.
>
> PS: I'm not an English speaker, but I hope my writing makes sense
> enough for you to understand.
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.