[plt-scheme] Re: Permutations (newbie)

From: wooks . (wookiz at hotmail.com)
Date: Sun Sep 17 15:58:51 EDT 2006

Look through Junes archives and onwards. I trod this path before you.

Don't feel  bad... I didn't even manage to get a working solution to start 

>From: Andrew Kesery <andrew.kesery at gmail.com>
>To: plt-scheme at list.cs.brown.edu
>Subject: [plt-scheme] Re: Permutations (newbie)
>Date: Sun, 17 Sep 2006 19:23:24 +0000 (UTC)
>Matthias Felleisen <matthias at ...> writes:
> > 1. Please don't post solutions to these problems on the newsgroup.
>I'm sorry, I didn't know the book was off-limits on the newsgroup. My 
>doesn't quite adhere to the templates provided in the book, so the damage 
>be limited - it's bound not to be the only public permutation 
>implementation out
> > 2. Follow the design recipe. You're obviously not and that explains
> > your struggle.
> > For example, a test is not
> >
> >   (f 10) ;; test
>Are the recipes provided in the book actual standard Scheme idiom? I 
>them as just one way of approaching programming. My "; test" comment was 
>just a reminder to myself and I didn't intend to post that entire line.
> > or even better
> >
> >   (equal? (f 10) 20)
>That is how I tend to test my Scheme snippets, usually with a couple of 
>bunched together in an (and) to get a single failure/success result. It 
>my purposes at this point.
> > 3. HtDP does not teach you Scheme (just a bit) but it teaches you the
> > process
> > of going from a blank screen and a problem statement to a program in a
> > systematic manner.
>That means I'm abusing it, but whatever. I like its structure and intend to 
>it for getting a gradual feel for the language, doing the exercises I find
>interesting and skipping the parts that aren't. I hope that this approach 
>prevent the writing language A in language B syndrome. I do not follow the
>templates - just read the syntax, tutorials and assignments, and think of 
>my own
>solution if they strike me as useful. I intend to combine it with the 
>book when I find myself skipping TOO much text.
> > 4. Someone who teaches you Scheme (only) may wish to show you loops
> > first.
> > Things like map and filter and so on. And before you know it, he's shown
> > you how to write permutations in 4 lines of code. And after you stare
> > long enough at it, you even understand it. But what do you carry
> > over from that process to Java, for example?
>Exactly. I can program an example like this in an imperative fashion and it 
>indeed a few LOCs. But I'm working within the confines of my Scheme 
>which makes it more challenging, to me anyway.
>Given the fact that I'm doing self-study and have no other way of getting
>feedback, I hoped the members of the list would be willing to act as a 
>board on the quality of the solution - if necessary in private so as to not 
>my publication of the code even worse.
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.