kotlin flat map code example Example: kotlin flatmap val result = listOf("abc", "12").flatMap { it.toList() } println(result) // [a, b, c, 1, 2]