On May 26, 2012, at 10:32 AM, Don Green wrote: > (with-output-to-file file > #:exists 'replace > (lambda () > (for ((ch content)) (display ch)))) ;<<<<<<<<<<<<<<<<<<what is ch?
Like all languages, Racket for loops specify a variable _ch_ that run over some compound data structure, in this case the string in _content_ . > ;; --- test > (check-equal? (with-output-to-string > (lambda () > (for ((ln (answer file))) > (displayln (string-join ln))))) ;<<<<<procedure > string-join: expects 2 arguments, given 1: '("Do" "you" "think" "it" "is" > "long" "enough?") > expected) I assume you're running a version of DrRacket that's a bit behind. Add " " as the second argument.
____________________ Racket Users list: http://lists.racket-lang.org/users