[plt-scheme] mutation in typed scheme structs

From: keydana at gmx.de (keydana at gmx.de)
Date: Tue Apr 13 11:10:29 EDT 2010


one question regarding typed scheme: can I use mutation in typed scheme structs, like e.g.

(define-struct: pt ([x : Real] [y : Real]))
(define p (make-pt 1 2))
(set-pt-x! p 22)

I tried adding #:mutable to one of the fields with different syntaxes, but didn't get it to work - could someone give me a little hint please?

Thanks in advance,

Posted on the users mailing list.