更新时间:2023-11-26 20:00:52
filterIndexed函数完全适合这种情况:
filterIndexed
filterIndexed function is suited exactly for this case:
array.filterIndexed { index, value -> index % n == 0 }
使用迭代索引的Kotlin过滤器Lambda数组
如何使用过滤器脚本迭代Elasticsearch中的嵌套数组?