From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Arne Babenhauserheide Newsgroups: gmane.lisp.guile.devel Subject: Fwd: Re: definition in expression context, where definitions are not allowed Date: Sun, 11 Oct 2015 19:14:54 +0200 Message-ID: <2254892.oVCiFdDlW8@fluss> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2575195.Adh8XvyFAg"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1444583744 24110 80.91.229.3 (11 Oct 2015 17:15:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Oct 2015 17:15:44 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Oct 11 19:15:35 2015 Return-path: Envelope-to: guile-devel@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 1ZlKDd-0001Qy-Rq for guile-devel@m.gmane.org; Sun, 11 Oct 2015 19:15:33 +0200 Original-Received: from localhost ([::1]:49209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlKDc-0003KH-Qt for guile-devel@m.gmane.org; Sun, 11 Oct 2015 13:15:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlKD9-0003En-79 for guile-devel@gnu.org; Sun, 11 Oct 2015 13:15:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlKD4-0001vb-7C for guile-devel@gnu.org; Sun, 11 Oct 2015 13:15:03 -0400 Original-Received: from mout.web.de ([212.227.17.11]:54157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlKD4-0001vU-1E for guile-devel@gnu.org; Sun, 11 Oct 2015 13:14:58 -0400 Original-Received: from fluss.localnet ([85.212.65.151]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0Mhlmh-1ZyImh3C9D-00MvV4; Sun, 11 Oct 2015 19:14:56 +0200 User-Agent: KMail/4.14.8 (Linux/3.14.14-gentoo; KDE/4.14.8; x86_64; ; ) X-Provags-ID: V03:K0:DdkFc1eiNylYQrfDmDO9iKOxs0WgmkXBd/6WsAuL23laaTq4sSC b6HMOR4TaPpEPG5ZO4cEweaG1L611XtbEPKyTilebhF3HTn0VKyiv6s48jmKPOTqKpq39KF 6S5Rn07VTWjoIaMdrXL6GyO1FVu5SO+/46quaeCXOo/enEx0oQ74OsKcSpqbRo5vi8NAYQe 1DPAS1iYQX1LRp4MdB6JQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:ClDKUG59Edg=:P5TUien47UurhRybwRLZ8t U2lpEh8uNFvjLcLeLFPaj755ZVb4IlHRiEfXJjmYe7C37SPpc2a2VLWmTRvpNRn+0Rc3jkCMZ VOPCxvu43W76VrqevR4ISSk3IxYzP/YZHHPtqFV5ZIjnKxKzTOlUVc4oSaiWK6GFbkkQ4Ppu4 y/RhcNoEMVsUZGyqTJwQ2jKirBD3/7WqNjZHOlmc5tksq/OKrwnzmtU3ezqBnlM7x9DLZoRV0 znR+Mau5xATVMi5GFNBOOPdk9AkvSc2xSFBPZ+tXRCikdOuvfvz+Gkl/ztS+9RxBe13JMeQel 5RGKMjLEw0dBm8mF3cwZwp9/y3U7/qm53vkXKSveFhbmoDVzz1g9JYCwXMENwMkupj9XwwbV2 5op6IAi2e4qUT4Ar7RU/G/LcjbqCAwzW3eUzbZDvhjJ7tKwSL+hrw6n41ZRQD48o1yS8iL3c6 HoRbOvWfUPrR76hx0JVIatoBUXkSWOiI/s1lrUnyZBGxmE6KNkgS8eiYoSDzExiMt9NL6IX2D hNZ5/NI7tu/N5u12eQduXXS7+dzbeVInEuX4gptjiEa5vVI+m6iUBcTnv+Fk8qAh/7Qrbhat7 ktZy3qC2KzWXL6ryZsNbEBWhhNyD05ZmMkN9yROb+Wlkbbd0/1LtcikvJCebmg3ruqn2XHZwi 475rT6oWuSfTF3umOfxt/S3CzsWsLnALWkNcwBDCDamsLfqnS1lgcDgLBagrD+PpwlTqvs3jG RSYxltJIgMx9GxhuJ3cQMaddoSgmmBqCAQM2hwH+p875qR+ozoPNVpOidi4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.11 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17906 Archived-At: --nextPart2575195.Adh8XvyFAg Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi David, Thank you for answering! May I send my reply to guile-devel? Am Sonntag, 11. Oktober 2015, 09:58:59 schrieb David Kastrup: > > Or am I missing something else which is enabled by this limitation?= >=20 > A function defined with `define' may call a function defined in a > _following_ `define'. How do you make that work when a statement > in-between can already call the first function? So this is a guarantee that all defines in a block of defines can call each other? I now looked it up in r7rs small.[1] > Definitions can occur at the beginning of a body (that > is, the body of a lambda, let, let*, letrec, letrec*, > let-values, let*-values, let-syntax, letrec-syntax, > parameterize, guard, or case-lambda). > An expanded body containing internal definitions can al- > ways be converted into a completely equivalent letrec* > expression. So essentially this is just explicit scoping, as with let. And let proved to me that it works better than just assigning anywhere (because it doesn=E2=80=99t have a large overhead). So I think what threw me off is mainly the error message:=20 > definition in expression context, where definitions are not allowed This does not tell me how I can do what I intended to. =E2=80=9Call definitions must be at the beginning of the body. You can for example create a new scope with let ().=E2=80=9D Best wishes, Arne [1]: http://trac.sacrideo.us/wg/wiki/R7RSHomePage http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7rs.pdf 5.3.2, page 26 --nextPart2575195.Adh8XvyFAg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iJwEAAEIAAYFAlYamQ4ACgkQ3M8NswvBBUgLEQP/XDtPzqKcoAeuE4t5gsaMLxyT siiYYHKBnPJAF77xAmZIt9QsXjszXaLZzL1A3WrwlE7rCHvtl0qsUQUznZbnKced WNAz6wDZ59/ZGHFemVYWwvnuZGBK1DZueVeteKXOTmBqS9my8CM41OpIAkPx+PXK lW+P+0IpamFEAsKrBUg= =1fYK -----END PGP SIGNATURE----- --nextPart2575195.Adh8XvyFAg--