Re: [racket-users] Beginners question: implementing existing generics for existing structs

2017-02-02 Thread Ronie Uliana
Thank you, Jon and andmkent! Jon, I understand the reason. However, I guess it's possible to fix that kind of problem using precedence the same way some languages do with traits and mixins. :) Anyway, thank you again! -- You received this message because you are subscribed to the Google

Re: [racket-users] Beginners question: implementing existing generics for existing structs

2017-01-31 Thread Andrew Kent
In this case, Alexis designed data/collection to work well with some of the pre-existing Racket generic interfaces. For example, since ddicts implement the gen:dict interface, you can use them with data/collection already: ``` #lang racket (require data/collection data/ddict) (define

Re: [racket-users] Beginners question: implementing existing generics for existing structs

2017-01-31 Thread Jon Zeppieri
On Tue, Jan 31, 2017 at 4:49 PM, Ronie Uliana wrote: > Let's assume I have a struct that is not mine (like ddict > [https://pkgn.racket-lang.org/package/ddict], or some of pfds > [https://pkgn.racket-lang.org/package/pfds]). I'd like to implement generics > for them

[racket-users] Beginners question: implementing existing generics for existing structs

2017-01-31 Thread Ronie Uliana
Let's assume I have a struct that is not mine (like ddict [https://pkgn.racket-lang.org/package/ddict], or some of pfds [https://pkgn.racket-lang.org/package/pfds]). I'd like to implement generics for them that also are not mine :p (like data/collection from Alexis King). 1 - Is it possible? 2