[plt-scheme] with-struct

From: Noel Welsh (noelwelsh at gmail.com)
Date: Wed Oct 21 15:28:21 EDT 2009

On Wed, Oct 21, 2009 at 7:34 PM, Jon Rafkind <rafkind at cs.utah.edu> wrote:
> Here is a macro that introduces fields of a struct into the current lexical
> environment so that instead of saying (foo-x some-foo) you can just say 'x',
> similar to pascal's `with' construct.

I use pattern matching in this situation:

(match-define (struct foo x y) a-foo)


Posted on the users mailing list.