From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bolega Newsgroups: gmane.emacs.help Subject: Re: lambda inside a let or letrec Date: Wed, 9 Jun 2010 22:37:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3f3fa71f-f6a5-43e7-9736-c4bfc013141c@e5g2000yqn.googlegroups.com> References: <6b121cee-8a28-4e27-a733-40d22028e05d@i28g2000yqa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291839549 19827 80.91.229.12 (8 Dec 2010 20:19:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 20:19:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 21:19:05 2010 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.69) (envelope-from ) id 1PQQTg-0005xO-7j for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 21:19:04 +0100 Original-Received: from localhost ([127.0.0.1]:37567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQQTf-0002Um-Eo for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 15:19:03 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!e5g2000yqn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.lisp,comp.lang.scheme Original-Lines: 43 Original-NNTP-Posting-Host: 75.28.154.75 Original-X-Trace: posting.google.com 1276148259 5121 127.0.0.1 (10 Jun 2010 05:37:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 10 Jun 2010 05:37:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e5g2000yqn.googlegroups.com; posting-host=75.28.154.75; posting-account=REkl4woAAABFXaU7nL79XtGpnmNCQ415 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:178789 comp.lang.lisp:288886 comp.lang.scheme:86929 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:75968 Archived-At: let me write it more clearly with indents as follows : (let ((a (lambda (n) (+ 1 n))) (b 3)) (a b)) On Jun 9, 10:34=A0pm, bolega wrote: > My apologies in advance to comp.lang.scheme and comp.lang.lisp. > > I am trying to run a certain syntax inside emacs lisp. > > I know basically how let works > > (let (list of pairs of var value) (function)) > > This is like a lambda function call , only the order is different. > > But the novelty i saw reading a book on common lisp or scheme is this > and i failed to run in emacs. plz tell what modifications are needed > and i know they are different. > > ( =A0 (lambda (n) (+ 1 n)) 3) =A0;;; works in emacs > > (let > ((a (lambda (n) (+ 1 n))) (b 3)) (a b)) =A0 ;;; does NOT work in emacs > > basically we are trying to use / abuse the let in that in the pair we > define a equal to a lambda. Then another pair where a value of b is > defined. > > next, we want a to operate on b. > > Why does it fail ? > > The scheme/lisp book/paper where it was seen (forgot) used letrec. > > Can someone enlighten me how set! and let can be used to formulate > recursion when the let has no recursion built in it ? > > thanks a lot. > cheers