This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: RnRS/Guile multi-let binding?
Mailing-List: contact guile-help@sourceware.cygnus.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:guile-unsubscribe-beshers=cs.columbia.edu@sourceware.cygnus.com>
List-Subscribe: <mailto:guile-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/guile/>
List-Post: <mailto:guile@sourceware.cygnus.com>
List-Help: <mailto:guile-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: guile-owner@sourceware.cygnus.com
Cc: guile@sourceware.cygnus.com
From: Jim Blandy <jimb@red-bean.com>
Date: 23 Sep 1999 18:10:33 -0500
Content-Type: text
Content-Length: 598
> Is there any standard way to do a binding like this:
>
> (multi-let ((label action image-left)
> (menu-item-properties menuitem))
> ... code using bindings of label action image-left ...
>
> I know this is easy to do (using rewrite to lambda where the actual args
> are the second list of elements), but is there some standard technique
> or module? It comes up a lot when decomposing lists and trying to write
> readable Scheme code.
Somebody whose name escapes me did a nice pattern-matching package for
Scheme. I want to snarf it for Guile; pattern matching is so nice.
I use Andrew Wright's. I may have even ported it to an old version of
guile, thought that's not a big deal if you use the slib version. You
can get a copy at the Internet Scheme Repository.
http://www.cs.indiana.edu/scheme-repository/
Or you can get it directly from Andrew's page, along with other goodies.
http://www.intertrust.com/star/wright/code.html
Cliff
--
Clifford Beshers Computer Graphics and User Interfaces Lab
beshers@cs.columbia.edu Department of Computer Science
http://www.cs.columbia.edu/~beshers Columbia University