[racket] writing a define-world macro

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Sun Jul 25 21:47:20 EDT 2010


Are you talking about the set-posn-x! and set-posn-y! mutators or
something else?

I just want something of the form:

;; posn-update-x: posn number -> posn
;; posn-update-y: posn number -> posn

Completely non-mutational--just recreates the exact same structure,
except for the updated value.

Which lvalues am I missing?


On Sun, Jul 25, 2010 at 6:44 PM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> Todd,
> Danny has defined updaters for his world.  However, the reason we
> didn't make these public is because we ultimately need to deal with
> lvalues, which (a) are arguably not a good idea, and (b) we certainly
> can't do as a macro anyway.  Make sure you think about that.
> Shriram

Posted on the users mailing list.