I would appreciate any advice on the best way to copy a prefab struct that
could be a sub-struct. I have been using write/read but felt bad about it.
Trying again now gave me a new option. Is there a better solution out there?
(define (copy-writable s)
(read (open-input-string (with-output-to-string (lambda () (write s))))))
(define (copy-prefab s)
(call-with-values (lambda () (vector->values (struct->vector s) 1))
(lambda args (apply make-prefab-struct
(prefab-struct-key s) args))))
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.