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

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

Re: Combining lists in Emacs Lisp


From: David Kastrup
Subject: Re: Combining lists in Emacs Lisp
Date: Thu, 06 Dec 2007 23:38:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Kodi Arfer <withheld@domain.tld> writes:

> before actually calling the sum function. So for the related situation in 
> Emacs Lisp, I'm inclined to try
>
> (+ 4 foo 3 bar)
>
> But after the arguments are evaluated, the expression becomes
>
> (+ 4 (1 2) 3 (0 0))

You can try

(apply '+ 4 3 (append foo bar))

Which is not necessarily terribly efficient but should work.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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