all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: shorter form of frequently-seen lisp idiom?
Date: Mon, 21 Feb 2005 01:28:15 +0100	[thread overview]
Message-ID: <x5y8didae8.fsf@lola.goethe.zz> (raw)
In-Reply-To: mailman.835.1108945397.32256.help-gnu-emacs@gnu.org

Denis Bueno <dbueno@gmail.com> writes:

> On Sun, 20 Feb 2005 00:55:53 +0100, David Kastrup <dak@gnu.org> wrote:
>> August <fusionfive@comhem.se> writes:
>> 
>> > On lör, 2005-02-19 at 19:43 +0100, David Kastrup wrote:
>> >> Joe Corneli <jcorneli@math.utexas.edu> 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

  parent reply	other threads:[~2005-02-21  0:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.680.1108839059.32256.help-gnu-emacs@gnu.org>
2005-02-19 18:43 ` shorter form of frequently-seen lisp idiom? David Kastrup
2005-02-19 23:31   ` August
     [not found]   ` <mailman.714.1108857188.32256.help-gnu-emacs@gnu.org>
2005-02-19 23:55     ` David Kastrup
2005-02-21  0:07       ` Denis Bueno
2005-02-21  0:17         ` Denis Bueno
     [not found]       ` <mailman.835.1108945397.32256.help-gnu-emacs@gnu.org>
2005-02-21  0:28         ` David Kastrup [this message]
2005-02-22 14:44 ` Stefan Monnier
2005-02-22 18:29   ` rgb
2005-02-22 18:51     ` Thien-Thi Nguyen
2005-02-23 16:29       ` rgb
2005-02-23 18:03         ` Thien-Thi Nguyen
2005-02-22 21:20     ` Oliver Scholz
2005-02-22 22:16       ` Drew Adams
     [not found]       ` <mailman.1159.1109113137.32256.help-gnu-emacs@gnu.org>
2005-02-23 18:48         ` rgb
2005-02-19 18:33 Joe Corneli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5y8didae8.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.