Subject: Re: list->string question
From: (Rob Warnock)
Date: 1999/10/23
Newsgroups: comp.lang.scheme
Message-ID: <7ur0ga$>
Frederic -Deelight- Jacquot <> wrote:
| Dirk van Deun <> wrote:
| > You must map a symbol->string operation over the list...
| Thank you very much, it works :)
| (define list2string
| (lambda (list)
| (if (= (length list) 1)
| (symbol->string (car list))
| (string-append (symbol->string (car list)) " " (list2string (cdr list)))
| )))

And just in case you don't already use a text editor that indents
Lisp/Scheme properly, please try to find one (or do it manually).
It will make your programs *so* much more readable to others:

    (define list2string
      (lambda (list)
	(if (= (length list) 1)
	  (symbol->string (car list))
	  (string-append (symbol->string (car list))
			 " "
			 (list2string (cdr list))))))

[Yes, I know, some people prefer all three args of an "if" to be
indented the same. But I don't.]


Rob Warnock, 8L-846
Applied Networking
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA