head

val head: Pair<K, V>

The first entry of this map.


Calling from Kotlin

Here's an example of calling this property from Kotlin code:

val expected: Pair<Char, Int> = 'a' to 1
val actual: Pair<Char, Int> = notEmptyMapOf(expected, 'b' to 2).head
assertEquals(expected, actual)