From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: Mixing syntax-rule and indentifier-syntax Date: Wed, 18 Jan 2012 17:23:29 +0100 Message-ID: <87k44pf08u.fsf@pobox.com> References: <87aa5mhu6r.fsf@Kagami.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1326903845 11901 80.91.229.12 (18 Jan 2012 16:24:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2012 16:24:05 +0000 (UTC) Cc: guile-user@gnu.org, Ian Price To: Tobias Brandt Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jan 18 17:24:01 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RnYIq-0005Yq-IW for guile-user@m.gmane.org; Wed, 18 Jan 2012 17:24:00 +0100 Original-Received: from localhost ([::1]:53153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnYIq-00085p-37 for guile-user@m.gmane.org; Wed, 18 Jan 2012 11:24:00 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnYIc-00081c-RY for guile-user@gnu.org; Wed, 18 Jan 2012 11:23:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnYIS-00032d-PH for guile-user@gnu.org; Wed, 18 Jan 2012 11:23:46 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:47137 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnYIS-00032Y-Lw for guile-user@gnu.org; Wed, 18 Jan 2012 11:23:36 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 83D7F8E04; Wed, 18 Jan 2012 11:23:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=hmsNQzvmRG2m E8ZiynqIPtLYNNI=; b=OT6K2yAgHx7WAxpzY7njAATOJ2qd6OVChlqfUgnLHHqq qYH4ndSH6sgC/EqDSSVFa2TgcQidHpQC2/qi/VIV88X4Tdlv1rT9SqCmVC+gT+kW vp73g2Fvq9m/DwLaZZeoKRFUXaVpZRkAjUpnQ9VtkYi5ceBYu8o1pS4X39nzcVE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=UpHZR2 7S172WTwS83LQbgR7RLfnSBIfMp2TJMh7Sqh0/r3/m6YXnAGCuAtyT8hOU0e5pv4 BvDTvZ84IAxbNSofyMqOW+jzvOEQN53F6h7aIVzADPKubpJRwePeUsfc2MGRv+N/ da7FJ+Xdx0wcG7sC596jen7MR5ltpPB7GmIBM= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 7CEC18E03; Wed, 18 Jan 2012 11:23:36 -0500 (EST) Original-Received: from badger (unknown [80.102.159.158]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id DDABB8E02; Wed, 18 Jan 2012 11:23:35 -0500 (EST) In-Reply-To: (Tobias Brandt's message of "Wed, 18 Jan 2012 00:26:56 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: C59212E4-41F0-11E1-B7AA-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 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:9160 Archived-At: On Wed 18 Jan 2012 00:26, Tobias Brandt writes: >> 0. I'm sure there is another way, but my mind blanks at the moment > > After you got me started, I was able to simplify and generalize it a bit. > (-> is a GOOPS generic accessor I defined elsewhere. It works with > vectors, arrays, strings, etc ...) > (define-syntax with-accessors=C2=A0 (lambda (stx)=C2=A0 =C2=A0 (syntax-ca= se stx () > =C2=A0 ((_ (id ...) exp ...)=C2=A0 =C2=A0 =C2=A0 =C2=A0#`(begin=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#,@(let (;; checks if My eyes!!! ;-) Can you repost, but without having your editor wrap the lines? Thanks :) Andy --=20 http://wingolog.org/