to

infix fun <A, B> A.to(that: B): Pair<A, B>(source)

Creates a tuple of type Pair from this and that.

This can be useful for creating Map literals with less noise, for example:

Since Kotlin

1.0

Samples