Actually, that's the interesting thing about trait...
# stdlib
f
Actually, that's the interesting thing about traits. Their implementations can be derived simply by implementing a small set of methods. Once you know how to traverse a Traversable object, the other methods arrive for free, and you don't have to implement a single one. It's basically a more formal / closely bound version of extension methods, if you're looking at it from a Kotlin/.NET perspective.
hints on the concrete instance
That seems like a case where you need more specific interfaces. Even if they appear to have similar methods, you may be able to set different expectations between them, with implementations choosing the interfaces that they best fit. Though then you run into the issue with namespace collisions, etc. So it's not a perfect solution, either.