过滤

val positives = list.filter { x -> x > 0 }

或者更简洁的方式

val positives = list.filter { it > 0 }

results matching ""

    No results matching ""