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

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

Re: newbie questions: why doesn't ((lambda (x) (x 2)) (lambda (n) (+ n 3


From: Thien-Thi Nguyen
Subject: Re: newbie questions: why doesn't ((lambda (x) (x 2)) (lambda (n) (+ n 3))) work in elisp?
Date: Sat, 31 May 2008 08:41:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

⎛⎞ Tahsin Alam <tahsin.alam@db.com>
⎝⎠ Fri, 30 May 2008 13:03:49 -0400

   As the subject says - why does the following expression give
   error when I try to evaluate it in the *scratch* buffer?

   ((lambda (x) (x 2)) (lambda (n) (+ n 3)))

One reason is because Emacs Lisp is not Scheme (sigh).
You can try this, instead:

(funcall (lambda (x) (funcall x 2)) (lambda (n) (+ n 3)))

thi




reply via email to

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