Kotlin flatMap 高级函数 操作数组的数组

    val numbers1 = listOf<Int>(213, 4, 534, 646, 757, 8, 97, 9);
    val numbers2 = listOf<Int>(214, 5, 535, 647, 758, 9, 98, 10);
    val numbers3 = listOf(numbers1, numbers2);
    val res = numbers3.flatMap {
        it
    }
    println(res)

猜你喜欢

转载自blog.csdn.net/mp624183768/article/details/124133203
今日推荐