Are there implicit interfaces I can use to match data classes component functions? I'd like to be able to have an extension function for any data class that has
component1(): Double
and
component2(): Double
. I can declare my own interface and have my data classes extend it but it feels like something that should be implicit.