The following compiles just fine using scala Beta1 and scalaz snapshot 5.0:
val p1: Int => Boolean = (i : Int) => i > 4
val s: List[Int] = List(1, 2, 3)
val b1 = s ∃ p1
And yet this does not:
val s: Set[Int] = Set(1, 2, 3)
val b1 = s ∃ p1
I get the following error:
Found: Int => Boolean
Required: Boolean => Boolean
The signature of the ∃
method is:
def ∃(p: A => Boolean)(implicit r: FoldRight[M]): Boolean = any(p)
And there should be an implicit SetFoldRight
in scope. It is exactly the same for the methods: ∀
, ∋
and ∈:
- what is going on?