Page 1 of 1

Faster/better way converting from list to string?

Posted: Mon Mar 15, 2004 5:01 pm
by newdep
Hello All,

What is the "best" way to convert a list into a string, silly question perhpas
but as it is not a standard function in lisp i can only emagine i.e. as a way
to do it: -->

(join xxx "") ; where xxx is the list and a string is returned.

Any quicker of better way is welcome ;-)

Regards,
Norman.

Posted: Mon Mar 15, 2004 5:09 pm
by Lutz
(set 'lst '(a b c d e f))

(join (map string lst)) => "abcdef"

;;; or

(string lst) =>"(a b c d e f)"

Lutz