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.