From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Denis Bueno Newsgroups: gmane.emacs.help Subject: Re: shorter form of frequently-seen lisp idiom? Date: Sun, 20 Feb 2005 19:17:34 -0500 Message-ID: <6dbd4d0005022016172e593ad2@mail.gmail.com> References: <6dbd4d00050220160740636f@mail.gmail.com> Reply-To: Denis Bueno NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1108946434 15380 80.91.229.2 (21 Feb 2005 00:40:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Feb 2005 00:40:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 21 01:40:34 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D31ck-0007Ax-37 for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Feb 2005 01:40:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D31ta-0003mW-8P for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Feb 2005 19:57:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D31pm-0002wK-2w for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 19:53:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D31pZ-0002qV-Ev for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 19:53:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D31pY-0002jL-Ig for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 19:53:44 -0500 Original-Received: from [64.233.184.194] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D31GZ-0003sA-7l for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 19:17:35 -0500 Original-Received: by wproxy.gmail.com with SMTP id 36so1007056wra for ; Sun, 20 Feb 2005 16:17:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=UaXS6XmTiAph8B1o78IclvYtTHa/lTxyDGcdNK4qRRVhqPh3+QvXIfRedhCqw4q0YwoZC8mRMi0Sa29rKpTUUZJsLbhHKM0O1RJ1PFthetOpdQCYUm/3YRLAnDpPAFA2SKfh86X65C+wj0rtw6lth0krk2O/LAxvZydxSHQ6RW4= Original-Received: by 10.54.27.7 with SMTP id a7mr37636wra; Sun, 20 Feb 2005 16:17:34 -0800 (PST) Original-Received: by 10.54.43.68 with HTTP; Sun, 20 Feb 2005 16:17:34 -0800 (PST) Original-To: help-gnu-emacs@gnu.org In-Reply-To: <6dbd4d00050220160740636f@mail.gmail.com> 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:24208 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24208 You might need to (require 'cl) first. On Sun, 20 Feb 2005 19:07:11 -0500, Denis Bueno wrote: > On Sun, 20 Feb 2005 00:55:53 +0100, David Kastrup wrote: > > August writes: > > > > > On l=F6r, 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)) >=20 > Or even: >=20 > (reduce #'function-that-acts-on-2-foos list-of-foos) >=20 > Like: >=20 > (reduce #'concat '("aoeu" "1234" "htns")) =3D> > "aoeu1234htns" >=20 > -- > Denis Bueno >=20 --=20 Denis Bueno