although, with kotlins ability to statically dispa...
# language-proposals
g
although, with kotlins ability to statically dispatch on generic types, I could do something like
Copy code
data class Coordinate(val key: String, val value: Double)

fun myDomainFunctions(input: List<Coordinate>){
  
  val result = input["x3"]
}

operator fun List<Coordinate>.get(key: String): Double = //...
but then I'd have to carefully consider how the generic v-table
List.get(index: Int)
miight collide with such an extension function