[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shorter form of frequently-seen lisp idiom?
From: |
David Kastrup |
Subject: |
Re: shorter form of frequently-seen lisp idiom? |
Date: |
Mon, 21 Feb 2005 01:28:15 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
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
Re: shorter form of frequently-seen lisp idiom?, Stefan Monnier, 2005/02/22
Re: shorter form of frequently-seen lisp idiom?, Oliver Scholz, 2005/02/22
RE: shorter form of frequently-seen lisp idiom?, Drew Adams, 2005/02/22
Message not availableRe: shorter form of frequently-seen lisp idiom?, rgb, 2005/02/23