From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: shorter form of frequently-seen lisp idiom? Date: Mon, 21 Feb 2005 01:28:15 +0100 Organization: Organization?!? Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1108945684 13929 80.91.229.2 (21 Feb 2005 00:28:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Feb 2005 00:28:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 21 01:28:04 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D31Qc-0005sQ-BU for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Feb 2005 01:27:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D31hS-0000Qr-Nj for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Feb 2005 19:45:22 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-X-Trace: individual.net 3VNn6nW11GePtDviZUpbVQwts+CqAXc/40eJJ7g+igEixnLac5 X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:vfJgMjC6EtwCTN2uxUvComLTH8Q= Original-Xref: shelby.stanford.edu gnu.emacs.help:128672 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24206 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24206 Denis Bueno writes: > On Sun, 20 Feb 2005 00:55:53 +0100, David Kastrup wrote: >> August writes: >> >> > On lör, 2005-02-19 at 19:43 +0100, David Kastrup wrote: >> >> Joe Corneli writes: >> >> >> >> > Is there a shorter way to concatenate a list of strings >> >> > than this? >> >> > >> >> > (eval (append (list 'concat) list-of-strings)) >> >> > >> >> > Or more generally, >> >> > >> >> > (eval (append (list 'function-that-acts-on-foos) list-of-foos)) > > Or even: > > (reduce #'function-that-acts-on-2-foos list-of-foos) > > Like: > > (reduce #'concat '("aoeu" "1234" "htns")) => > "aoeu1234htns" Why should one do that? Quite less efficient than using "apply", and only available if cl has been loaded. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum