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:49 -0700 (PDT) Organization: http://groups.google.com Message-ID: 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 1291830283 4023 80.91.229.12 (8 Dec 2010 17:44:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 17:44:43 +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 18:44:39 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 1PQO4A-0002xc-NU for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 18:44:34 +0100 Original-Received: from localhost ([127.0.0.1]:55682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQO4A-0002k8-2q for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 12:44:34 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!z10g2000yqb.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 1276148269 5341 127.0.0.1 (10 Jun 2010 05:37:49 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 10 Jun 2010 05:37:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z10g2000yqb.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:178790 comp.lang.lisp:288887 comp.lang.scheme:86930 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:75722 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