[plt-scheme] HTDP 12.4.2

From: wooks wooks (wookiz at hotmail.com)
Date: Thu Jun 22 14:06:30 EDT 2006

At 4:43 AM +0100 6/22/06, wooks wooks wrote:
>LOL. Ok I've been rumbled.

Gee, I hope not :-)

>I'll start all over again the way I've been told and await the light bulb 

"Awaiting the light bulb moment" is what you've BEEN doing; we suggest 
instead following a systematic procedure that doesn't rely on unpredictable 
light bulbs.

I meant the light bulb moment as in true understanding why one should stick 
to the systematic procedure (something more than thats how they told me to 
do it).

Anyway I'd appreciate some input on this revised effort (most particularly 
my template) before going to the next stage.

;insertEverywhere : symbol ('a - 'z) list-of-words - list of words
;returns a list of words constructed by interpersing symbol before, after 
and between each letter, of
;each word in the list-of-words
;(insertEverywhere 'd
;  (cons (cons 'e (cons 'r empty))
;    (cons (cons 'r (cons 'e empty))
;      empty))) gives
; (list (list 'd 'e 'r)
;       (list 'e 'd 'r)
;       (list 'e 'r 'd)
;       (list 'd 'r 'e)
;       (list 'r 'd 'e)
;       (list 'r 'e 'd))

;(define (insertEverywhere sym alow)
;  (cond
;    [(empty? alow) ...sym....]
;    [else ...sym...(first (first alow)) .....
;          ..sym....(rest (first alow)) .....
;          .....(insertEverywhere sym (rest alow)).....]
;   )

Posted on the users mailing list.