From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "John B. Brodie" Newsgroups: gmane.lisp.guile.user Subject: Re: Define in let Date: Tue, 20 Aug 2013 13:18:50 -0400 Message-ID: <5213A4FA.1030309@gmail.com> References: <87k3jgb9kr.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1377032358 13673 80.91.229.3 (20 Aug 2013 20:59:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Aug 2013 20:59:18 +0000 (UTC) Cc: guile-user@gnu.org To: Dmitry Bogatov Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Aug 20 22:59:22 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VBt1K-0003S6-86 for guile-user@m.gmane.org; Tue, 20 Aug 2013 22:59:18 +0200 Original-Received: from localhost ([::1]:49796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBt1J-00047b-UN for guile-user@m.gmane.org; Tue, 20 Aug 2013 16:59:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBpaA-00058g-Vd for guile-user@gnu.org; Tue, 20 Aug 2013 13:19:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBpa6-0003Al-J1 for guile-user@gnu.org; Tue, 20 Aug 2013 13:19:02 -0400 Original-Received: from mail-vb0-x22c.google.com ([2607:f8b0:400c:c02::22c]:57336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBpa1-00039s-JY; Tue, 20 Aug 2013 13:18:53 -0400 Original-Received: by mail-vb0-f44.google.com with SMTP id e13so395544vbg.17 for ; Tue, 20 Aug 2013 10:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=EgYqr3OKsEB+pmK3Lbr3XdHYY7t4HVCxGMwxUtb2+Q8=; b=F/GAwvpnX9SV3t1GMRlKoKlcJtxVpDbaq6OwVAOZp74hh7FlOrYyGzF1eD5tvyobus 9I7HEVmJh1sDHAufzC/Tvz4iSND055xt0xGA4NcQMOvWd6xyi+8DkWNx7nmSFN9apyWN dNEP1ySQZzIKdWF0RNYVxFpQmpjmkngNI3s5WibclqIFCMgzdRz6WiWze/EzQJhtZvKw L7zQ9bx1ce7TQFCvEl5p8FaCKXF6KBS/ss+FrApeTmRtQG3h6lSsoeBCGx5CIkPAYMQM ZwoMmGEbqFrAlBHUz6BiFl8GLkm0B0/hqVfXt+cuVkW0xrbMRhkX2SFOGjuOfb+j28Vw AkhA== X-Received: by 10.58.54.70 with SMTP id h6mr840082vep.36.1377019132744; Tue, 20 Aug 2013 10:18:52 -0700 (PDT) Original-Received: from [192.168.0.9] ([97.102.55.200]) by mx.google.com with ESMTPSA id zq8sm590917vdb.2.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Aug 2013 10:18:52 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 In-Reply-To: <87k3jgb9kr.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c02::22c X-Mailman-Approved-At: Tue, 20 Aug 2013 16:59:09 -0400 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10655 Archived-At: On 08/20/2013 12:39 PM, Dmitry Bogatov wrote: > It seems following is invalid: > > (let ((a 2)) > (define (foo x) (+ a x))) > > I prefer to reduce scope of variable as much as possible, so > I find this restriction unconvinent. Is is part of standard or technical > limitation? Is it any workaround? use a lambda form rather than a define: (letrec ((a 2) (foo (lambda (x) (+ a x)))) (foo 3)) > > Please, keep in CC, I am not subscribed. > > -- > Best regards, Dmitry Bogatov , > Free Software supporter and netiquette guardian. > git clone git://kaction.name/rc-files.git --depth 1 > GPG: 54B7F00D > Html mail and proprietary format attachments are forwarded to /dev/null.