Bob Glamm
05/20/2019, 4:13 PMfun <A, B, C> tupled(f: (A, B) -> C): (Tuple2<A, B>) -> C = { (a, b) -> f(a, b) }
fun <A, B, C> ((A, B) -> C).tupled2(): (Tuple2<A, B>) -> C = { (a, b) -> this(a, b) }
are both valid, and destructuring the tuple works, so it seems like I should be able to write
fun <A, B, C> tupled(f: (A, B) -> C): (Tuple2<A, B>) -> C = ::f
fun <A, B, C> ((A, B) -> C).tupled2(): (Tuple2<A, B>) -> C = ::this
but sadly, neither of the latter works 😞