View Single Post
  #2 (permalink)  
Old 11-19-2008, 06:36 PM
Aaron W. Hsu
Guest
 
Posts: n/a
Default Re: Idle Chuckles with FORMAT

Aaron W. Hsu <arcfide@sacrideo.us> writes:

> (define list->cs-list-string
> (lambda (lst)
> (format #f "(~?)" "~@{~#[~;~s~:;~s, ~]~}" lst)))


Of course, a kind CLer gave me the following which I like better, but
certainly is ugly too. :-)

(define list->cs-list-string
(lambda (lst)
(format #f "(~{~s~^, ~})" lst)))

Gotta love FORMAT.

Aaron Hsu
--
Aaron W. Hsu <arcfide@sacrideo.us> | <http://www.sacrideo.us>
"Government is the great fiction, through which everybody endeavors to
live at the expense of everybody else." -- Frederic Bastiat
+++++++++++++++ ((lambda (x) (x x)) (lambda (x) (x x))) ++++++++++++++
Reply With Quote