[racket] Are there any functional structs in Racket

From: namekuseijin (namekuseijin at gmail.com)
Date: Wed Oct 20 14:58:22 EDT 2010

On Wed, Oct 20, 2010 at 4:50 PM,  <engineer at alum.mit.edu> wrote:
> Are you all also considering some way to conveniently update more than one
> at a time?  Functional style is still much more cumbersome than mutation
> style.
>
> (set (set a-world ufo wings right 'damaged) ufo wings left 'broken)
> starts to get cumbersome quickly.
>
> Is something like the below possible?  Is it scalable/manageable?  Maybe it
> needs more grouping symbols like a cond clause.
>
> (set a-world ufo wings right 'damaged
>                       left  'broken)

how about?
(let ((wings (dot a-world ufo wings)))
  (set (set wings right 'damaged) left 'broken))


Posted on the users mailing list.