On Jul 7, 2010, at 10:31 PM, Sam Griff wrote:
>> You're not consistent with the formatting of your documentation.
> Yeah... Sorry about that... I was mostly documenting the functions in
> a way that would most help me understand what was going on. I agree
> with you consistent documentation is im
> You're not consistent with the formatting of your documentation.
Yeah... Sorry about that... I was mostly documenting the functions in
a way that would most help me understand what was going on. I agree
with you consistent documentation is important.
> So, is that table really useful?
I think so
So, is that table really useful? I am not trying to be funny here.
I've chimed in the past on this problem to the point that some website
(according to my students) has earmarked me the expert on this
problem--some honor! In any case, it seems to me that you can get to
the solution by being discipl
Well done Sam!
Some small suggestions though.
You're not consistent with the formatting of your documentation. Chose
either the verbose documentation format, i.e.,
;; Contract
;; Purpose
;; Template
;; Definition
;; Examples/Tests
Or the concise format (more common)
I think I got it! It produces the correct results, but I'm not sure if
it follows the design pattern properly:
;; A word is either
;; 1. empty, or
;; 2. (cons s w)
;;where s is a symbol and w is a word
;; Examples:
;; (cons 'a empty)
;; (cons 'h (cons 'i empty))
;; (cons 'c (cons 'a (cons 't
> Isn't that too much help?
I don't think so because I know there is a problem with the second
clause and thinking recursively. I made a few charts like you
suggested:
s | w| (first w) |
(insert-everywhere/in-single-word s (rest w)) |
expect
Dear Sam
I may have given less than a clue, but now you alre4ady have got too much of
it.
My idea was to make you thinking:
A word is a list of letters.
Then: what is a list of words?
How do I add a letter to a word?
How do I add a word to a list of words?
And finally: how do I add a letter to
Isn't that too much help?
On Jul 6, 2010, at 6:46 PM, David Yrueta wrote:
> my base case the function should return a
> list of words but before returned a single word.
>
> Very good decision. Now take a close look at how you phrased the second
> condition. According to the design recipe,
my base case the function should return a
list of words but before returned a single word.
Very good decision. Now take a close look at how you phrased the second
condition. According to the design recipe, it should be structured to match
the second condition of your data definition for list-of-
> Exercise 12.4.2 is notorius. When looking to (list 'a 'b 'c), you should
> exspect 6 distinct permutations.
> Jos
Thanks for your response but that really doesn't help me much. I'm
focusing on insert-everywhere/in-single-word now. I understand what
arrangements does
and what permutations to expe
t 6 distinct permutations.
Jos
> -Original Message-
> From: users-boun...@racket-lang.org
> [mailto:users-boun...@racket-lang.org] On Behalf Of Sam Griff
> Sent: 06 July 2010 20:00
> To: users@racket-lang.org
> Subject: [racket] [htdp] Help with Exercise 12.4.2
>
> H
age-
> > From: users-boun...@racket-lang.org
> > [mailto:users-boun...@racket-lang.org] On Behalf Of Sam Griff
> > Sent: 06 July 2010 20:00
> > To: users@racket-lang.org
> > Subject: [racket] [htdp] Help with Exercise 12.4.2
> >
> > Hello. Like many others working
> To: users@racket-lang.org
> Subject: [racket] [htdp] Help with Exercise 12.4.2
>
> Hello. Like many others working through HtDP I have hit the
> wall at this exercise. I'm not sure what I have so far is in
> line with the "proper" way to do this exercise and
Hello. Like many others working through HtDP I have hit the wall at
this exercise. I'm not sure what I have so far is in line with the
"proper" way to do this exercise and would appreciate any
help/suggestions. Here is the code I have so far:
;; A list of words is either
;; 1. empty
;; 2. (cons w
14 matches
Mail list logo