From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Mattes Newsgroups: gmane.lisp.guile.user Subject: Re: Define in let Date: Wed, 21 Aug 2013 12:32:58 +0200 Message-ID: <20130821103258.GB16017@seid-online.de> References: <87k3jgb9kr.fsf@gnu.org> <20130820180137.301ace7e@capac> <20130821092851.GA16017@seid-online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1377081725 18267 80.91.229.3 (21 Aug 2013 10:42:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Aug 2013 10:42:05 +0000 (UTC) Cc: "guile-user@gnu.org" To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Aug 21 12:42:08 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 1VC5rb-0004nh-Sq for guile-user@m.gmane.org; Wed, 21 Aug 2013 12:42:08 +0200 Original-Received: from localhost ([::1]:52690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC5rb-0004t3-0S for guile-user@m.gmane.org; Wed, 21 Aug 2013 06:42:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC5qo-0003qN-4i for guile-user@gnu.org; Wed, 21 Aug 2013 06:41:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VC5qi-0003Xf-9f for guile-user@gnu.org; Wed, 21 Aug 2013 06:41:18 -0400 Original-Received: from mail.seid-online.de ([5.199.139.24]:59735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC5qi-0003XM-42 for guile-user@gnu.org; Wed, 21 Aug 2013 06:41:12 -0400 Original-Received: from ralf by mail.seid-online.de with local (Exim 4.80) (envelope-from ) id 1VC5ik-0004Bv-OE; Wed, 21 Aug 2013 12:32:58 +0200 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.24 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:10661 Archived-At: On Wed, Aug 21, 2013 at 12:17:43PM +0200, Panicz Maciej Godek wrote: > You're right, but it only works if you want to export only one symbol > from a lexical scope. If you wanted a few procedures accessing > a single scope, you'd either need to use the solution with 'set!', > or -- as Taylan suggested -- have a "define-values" form. Yes, but was that the OP's question? > Actually, I think should also be possible to write a "define-values" > macro using the method I presented [... snip ...] > but somehow we need to generate identifiers for symbol1 symbol2 ... > (here I wrote symbolically value1 value2 ..., but I'd appreciate if someone > more competent could provide a syntax-rules-based solution) Maybe it's time to point out that this question is in the Scheme-FAQ ;-) [http://community.schemewiki.org/?scheme-faq-language] - Section "Is there a way to define top-level closures?" (sorry, bad webdesign, no wa to link directlyto the topic). The answer not only mentions 'define-values but also links to an implementation: [http://community.schemewiki.org/?scheme-faq-macros#multidefine] that uses 'syntax-rules HTH RalfD