Subject: Re: stretch function. From: Paul Prescod <papresco@xxxxxxxxxxxxxxxx> Date: Thu, 25 Sep 1997 09:58:38 -0400 |
My solution has two problems. First, it uses map and string->list. There are versions of both floating around. Check the archive if you don't have one. The second is that it adds a space to the end of the string. The reason I suggest this mechanism despite the faults is because I think it is very easy to understand without understanding recursion: (define (add-space letter) (string letter #\space)) (define (space text) (apply string-append (map add-space (string->list text)))) (root (literal (space "abcde"))) Prints "a b c d e " Paul Prescod DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
stretch function., Pawson, David | Thread | Re: stretch function., Dave Love |
stretch function., Pawson, David | Date | DSSSL for software engineering?, Paul Prescod |
Month |