I'm trying different ways to define a struct that has the same fields as 
its superstruct without adding any new field, but all I get is errors 
saying struct expects a list of fields.
Something like:
(struct edible (name grams) #:transparent)
and then
(struct fruit #:super edible #:transparent)
or
(struct fruit edible #transparent)

Of course I could simulate this behavior myself creating different structs 
and then writing accesors and predicates that would work on all of them, 
like:
(define edible? (or? fruit? vegetable?  fish?))

But I'd rather ask first if there's an in-built, more elegant way of doing 
this.

-- 
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 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/8723311b-62d6-482e-a0ca-c020b32f5366n%40googlegroups.com.

Reply via email to