help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shorter form of frequently-seen lisp idiom?


From: Denis Bueno
Subject: Re: shorter form of frequently-seen lisp idiom?
Date: Sun, 20 Feb 2005 19:07:11 -0500

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"

--
Denis Bueno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]