[racket] Can I refer a member variable of a structure instance as a reference?

From: Insik Cho (iminsik at gmail.com)
Date: Thu Jun 24 20:39:47 EDT 2010

It works well. Thanks!

- Joe

On Thu, Jun 24, 2010 at 5:24 PM, Jon Rafkind <rafkind at cs.utah.edu> wrote:

>  #lang racket
>
> (define-struct foo (x y) #:mutable)
> (define foo-instance (make-foo 1 2))
> (set-foo-x! foo-instance 5)
> (foo-x foo-instance)
>
>
> On 06/24/2010 06:09 PM, Insik Cho wrote:
>
> Hi buddies,
>
> When I make an instance of a structure, I want to modify of the value of
> members of the instance.
>
> So, can I refer a member of a structure as a referent to update it directly?
>
> - Joe
>
>
>
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100624/b54cc905/attachment.html>

Posted on the users mailing list.