From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.help Subject: Re: newbie questions: why doesn't ((lambda (x) (x 2)) (lambda (n) (+ n 3))) work in elisp? Date: Sat, 31 May 2008 10:58:13 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1212226850 19587 80.91.229.12 (31 May 2008 09:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2008 09:40:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 31 11:41:32 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K2Nad-00043H-TY for geh-help-gnu-emacs@m.gmane.org; Sat, 31 May 2008 11:41:32 +0200 Original-Received: from localhost ([127.0.0.1]:38961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2NZr-0003O9-IV for geh-help-gnu-emacs@m.gmane.org; Sat, 31 May 2008 05:40:43 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!news.banetele.no!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: remote5.student.chalmers.se Original-X-Trace: quimby.gnus.org 1212224313 7047 129.16.29.83 (31 May 2008 08:58:33 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Sat, 31 May 2008 08:58:33 +0000 (UTC) Mail-Copies-To: never User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:ohXIrP8vSJJ1K0vmBjVfsj0YhLI= Original-Xref: news.stanford.edu gnu.emacs.help:159021 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54383 Archived-At: Thien-Thi Nguyen writes: > ⎛⎞ Tahsin Alam > ⎝⎠ 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))) The first funcall is unnecessary. -- Johan Bockgård