Kotlin optimize take first n elements with filter

后端 未结 0 543
孤城傲影
孤城傲影 2020-12-10 18:16

I have some list: List I need to take 3 elements from it that satisfy the condition:

I do it like this:

list.filter { g ->          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题