> I am trying to make good use of Generic Interfaces, but can't figure out if its at all possible to delegate calls up the struct inheritance chain. So, something like `call-next`
If I understand you correctly, "define/generic" let you do this. See https://docs.racket-lang.org/reference/struct-generics.html?q=generic#%28form._%28%28lib._racket%2Fgeneric..rkt%29._define%2Fgeneric%29%29 > or even better maybe there's a way to do explicit dispatch? So something like having two structs: If your structs don't inherit from each other, and no configuration of "fallback" or "default" options does what you want, a slightly different approach compared to extracting fish's implementation and reusing it is to use "define/generic" to get the existing "generic" function in your new struct's definition, and have a function convert a marlin to a fish, and then pass that over to the generic function. -- 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 racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.