From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Bogatov Newsgroups: gmane.lisp.guile.user Subject: Syntax-rules generate symbol Date: Mon, 09 Sep 2013 20:19:40 +0400 Organization: Church of Emacs Message-ID: <87txhuarxf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1378743765 27595 80.91.229.3 (9 Sep 2013 16:22:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Sep 2013 16:22:45 +0000 (UTC) To: "guile-user\@gnu.org" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 09 18:22:50 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 1VJ4Ei-0003jF-0E for guile-user@m.gmane.org; Mon, 09 Sep 2013 18:22:48 +0200 Original-Received: from localhost ([::1]:52678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJ4Eg-00072N-V6 for guile-user@m.gmane.org; Mon, 09 Sep 2013 12:22:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJ4E0-0006Rj-38 for guile-user@gnu.org; Mon, 09 Sep 2013 12:22:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJ4Dv-0004xY-P9 for guile-user@gnu.org; Mon, 09 Sep 2013 12:22:04 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJ4Dv-0004xU-Ll for guile-user@gnu.org; Mon, 09 Sep 2013 12:21:59 -0400 Original-Received: from [217.79.231.13] (port=39833 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1VJ4Dt-0004b1-HU for guile-user@gnu.org; Mon, 09 Sep 2013 12:21:59 -0400 User-agent: mu4e 0.9.9.5; emacs 24.3.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:10772 Archived-At: --=-=-= Content-Type: text/plain Hello! Here is my implementation of for loop. I found lisp really extremely flexible, but there is one problem --- more often then not I do not need var part, so I do not care how it would be named --- all I care is that it will not shadow any other bindings. I think I can do it(did not tryed it) with `define-macro` and uninterned symbols, but it mean give up beauty of syntax-rules. Masters of syntax-rules and syntax-case, please give me peace of advice. (define-syntax for (syntax-rules (in => as) ([_ (pattern as var in list) exp ...] [for-each (lambda (var) (match var (pattern exp ...))) list]))) PS. 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. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (GNU/Linux) iQIcBAEBAgAGBQJSLfUhAAoJEHiL4BJUt/ANsZ0P/1O+WQBeNtRGKkqnPc8Xak+O sRbfEWe7S28vccoW52mhcIMMnCeE6+WZfjqFTyO2tsHC9CWUOPyewGY6tFCtRh0B ocrFes7tfTIWj9Yes7ECWkZgSf7cpVIX1Oz6Hx4FrR0iNyY5Yy6s6TAYPwpBT5t5 AYv2FX7sEh4jUq/klzN2hteg+pcENXgwWLmc01YUiihaRE6oMZdr1BCkhfjbsS5I oC70PnorIi93B9M41cLcDZH2x51jpJECrniLO7l56FbN8iVU/cuv2jCEEsMhUZUK IQ4lxM0oHrJuNQt1OxYjaHqrBc9D+xHuBLZUcghNsqZot2ID3QfWt/nBXX13bsZp DcmXzZG+n/8D2l13/5xAMxMHMi8zZbHsIjQzA3BpZRw+gM7C5UXG1Lf+XqQ1V7qK fmTMOB+L9nbHd6oJaWjv41l/tpn8Bv2f9FpgkCo1Z2g6c/9JuqUSA6GZOimEzRt3 mfqNwD+Uou81VYH+05oHUWv/6j+lhwVpvfY75ALchDmQKRlG1OT2iJALsbneoz9B Q49wNbHL7FoilFs50gMOA2OZ+TiAydRainHsa938ciZMc4kCKuNv6MztMr3LBnRK va0X7Z40COgRVJ5JXtO7BFGo2ClAWWqcx/7frdeSVezLm8EJoW9sYUDYbDrrV4bF tCljFb7Kms1U9yqgLYw8 =4oUN -----END PGP SIGNATURE----- --=-=-=--