[plt-scheme] Re: Novice needs help writing function
Sorry, after looking over the code, I think you should send us
the WHOLE design before I make any other comment any more.
-- Matthias
On Dec 30, 2007, at 10:47 AM, Matthias Felleisen wrote:
> Perhaps I misunderstood your question but this is a perfectly fine
> solution.
>
> On Dec 29, 2007, at 2:35 PM, dave yrueta wrote:
>
>> Thanks for all the input everyone.
>>
>> I took N's advice, revisited the problem by stepping through the
>> design recipe, and came up with the following core and auxiliary
>> functions which cheat a bit....
>>
>> (define (apply-n1 face count)
>> (cond
>> [(zero? count) (draw-losh face)]
>> [else (apply-n3(move-picture 1 face)(sub1 count))]))
>>
>> (define (apply-n count)
>> (apply-n3 FACE count))
>>
>> Does this solution satisfy the pedagogical function of the problem?
>>
>> Also, cheers to M. for a wonderful book! For awhile I've had an
>> interest in computer programming, but career obligations have
>> relegated it to a hobby. For someone like me, who has never taken a
>> CS course and is not very good at math, the text is a godsend!
>>
>> Having come across the concept of recursion in general interest texts
>> like Godel Escher Bach and Godel's Proof, thanks to HTDP, I finally
>> feel as though I've gained some basic understanding of how it works.
>> I'm not sure if this is the appropriate forum, but I was wondering if
>> anyone could recommend a good introductory text on recursion
>> comprehensible to a non-specialist like myself. I think it's a
>> fascinating topic, and I'd love to learn more about it.
>
>
> HtDP :-)
>
> What are you looking for and may I forward the paragraphs (minus
> the praise) to the PLT mailing list for educators. -- Matthias
>
>
>
>
>
>
>
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Dec 29, 7:14 am, Matthias Felleisen <matth... at ccs.neu.edu> wrote:
>>> In this particular case, the problem is on my side. Working
>>> with draw.ss just doesn't fit with the natural development of
>>> the design recipe. I should have taken this symptom more seriously
>>> when I wrote this extended exercise. -- Matthias
>>>
>>> On Dec 29, 2007, at 8:42 AM, Noel Welsh wrote:
>>>
>>>> The design recipes are a (if not the) core part of HtDP. HtDP
>>>> is the
>>>> only book I know that takes designing programs from a dark and
>>>> mysterious art to a systematic process anyone can apply. This is a
>>>> really really powerful idea. So, if you haven't worked through the
>>>> design recipe, do so. If you have, then you might say what
>>>> difficulties you are having applying the recipe.
>>>
>>>> N.
>>>> _________________________________________________
>>>> For list-related administrative tasks:
>>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>
>>> _________________________________________________
>>> For list-related administrative tasks:
>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>> _________________________________________________
>> For list-related administrative tasks:
>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme