From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Tahsin Alam <tahsin.alam@db.com>
Cc: help-gnu-emacs@gnu.org
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 [thread overview]
Message-ID: <87mym7asbf.fsf@ambire.localdomain> (raw)
In-Reply-To: <OFA17554A7.4E256B23-ON85257459.005DA659-85257459.005DBBA3@db.com> (Tahsin Alam's message of "Fri, 30 May 2008 13:03:49 -0400")
⎛⎞ 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
next prev parent reply other threads:[~2008-05-31 6:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-30 17:03 newbie questions: why doesn't ((lambda (x) (x 2)) (lambda (n) (+ n 3))) work in elisp? Tahsin Alam
2008-05-31 6:41 ` Thien-Thi Nguyen [this message]
[not found] ` <mailman.12481.1212216300.18990.help-gnu-emacs@gnu.org>
2008-05-31 8:58 ` Johan Bockgård
[not found] <mailman.12463.1212181801.18990.help-gnu-emacs@gnu.org>
2008-05-30 21:27 ` Joost Diepenmaat
2008-05-30 21:33 ` Joost Diepenmaat
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mym7asbf.fsf@ambire.localdomain \
--to=ttn@gnuvola.org \
--cc=help-gnu-emacs@gnu.org \
--cc=tahsin.alam@db.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).