[racket] writing a define-world macro

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Sun Jul 25 21:49:14 EDT 2010

Generalize.

On Sun, Jul 25, 2010 at 9:47 PM, Todd O'Bryan <toddobryan at gmail.com> wrote:
> Huh?
>
> 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?
>
> Todd
>
> 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.