From ... Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!xfer13.netnews.com!netnews.com!howland.erols.net!EU.net!Norway.EU.net!127.0.0.1!nobody From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Adding a charcter to the end of a string. Date: 31 Oct 2000 20:32:01 +0000 Organization: Naggum Software; vox: +47 800 35477; gsm: +47 93 256 360; fax: +47 93 270 868; http://naggum.no; http://naggum.net Lines: 29 Message-ID: <3182013121476520@naggum.net> References: <8tn0sj$30d$1@nnrp1.deja.com> <8tn3g2$5g9$1@nnrp1.deja.com> <8tn8sn$aeu$1@nnrp1.deja.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: oslo-nntp.eunet.no 973024329 22002 195.0.192.66 (31 Oct 2000 20:32:09 GMT) X-Complaints-To: newsmaster@eunet.no NNTP-Posting-Date: 31 Oct 2000 20:32:09 GMT mail-copies-to: never User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Xref: supernews.google.com comp.lang.lisp:2997 * John Clonts | But I have a different question: How to "coerce" a list of symbols | to append them into a string: By not getting into this fix to begin with. (Why are they symbols?) | (setf aa '(a bc de f)) | (list-of-symbols-to-string aa) ==> "abcdef" | | This is how I did it: | (defun list-of-symbols-to-string (list) | (apply #'concat-strings (mapcar #'string list))) | | (defun concat-strings (&rest r) | (eval (append '(concatenate 'string ) r))) | | But I really wanted to do without the eval, rather something like: | (defun concat-strings (&rest r) | (concatenate 'string @r)) (apply #'concatenate 'string (mapcar #'string list)) If you have a Scheme background (where apply takes two arguments), you could have consed 'string onto the list of arguments, too. #:Erik -- Does anyone remember where I parked Air Force One? -- George W. Bush