컬렉션을 부울 값으로 매핑한 다음 contains를 사용하는 경우를 보고합니다.
빠른 수정에서는 .exists() 또는 !.forall()을 사용합니다.
예:
def p(x: Int): Boolean = ???
var seq: Seq[Int]
seq.map(p).contains(true)
seq.map(p).contains(false)
빠른 수정 적용 후:
def p(x: Int): Boolean = ???
var seq: Seq[Int]
seq.exists(p)
!seq.forall(p)