[plt-scheme] Does anyone use `set!' and `get!' patterns?
This is probably the original motivation for this feature. For
example, with the generic setters in Swindle, you get
(inc! (cadddr x))
to expand to
(set-cadddr! x (+ (cadddr x) 1))
and my guess is that with the match setters, it would be like doing
(let ([x (cdddr x)]) (set-car! x (+ (car x) 1)))
On Mar 11, Robby Findler wrote:
> Yeah, similar, I'd say. Except that here you're also doing a pattern
> match so you have all that going on at the same time.
>
> Robby
>
> On Sun, Mar 9, 2008 at 11:54 AM, Joe Wells <jbw at macs.hw.ac.uk> wrote:
> > "Robby Findler" <robby at cs.uchicago.edu> writes:
> >
> > > No, I don't think so -- get and set patterns aren't just that. They
> > > bind mutators and gettors to some place down inside some value.
> >
> > Is this like Common Lisp setf/getf?
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!