Faster/better way converting from list to string?

For the Compleat Fan
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Faster/better way converting from list to string?

Post 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.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

Locked