rip*_*234 41 scala predicate
测试集合中所有项目是否与谓词匹配的最惯用方法是什么?
任何项目?
om-*_*nom 67
这里有内置函数:
List(1,2,3,4).forall(x => x < 5) res0: Boolean = true
任何:
List(1,2,3,4).exists(x => x > 3) res1: Boolean = true
归档时间:
12 年,6 月 前
查看次数:
12446 次
最近记录:
8 年,9 月 前