--
You received this message because you are subscribed to the Google Groups "fp-cn" group.
To post to this group, send email to fp...@googlegroups.com.
To unsubscribe from this group, send email to fp-cn+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/fp-cn?hl=en.
def forall(s: Set, p: Int => Boolean): Boolean = {
def iter(a: Int): Boolean = {
if (???) ???
else if (???) ???
else iter(???)
}
iter(???)--
You received this message because you are subscribed to the Google Groups "fp-cn" group.
To post to this group, send email to fp...@googlegroups.com.
To unsubscribe from this group, send email to fp-cn+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/fp-cn?hl=en.
Forall : Only all element in s: Set pass p-condition return true. || any 1 element fail p-condition, return false In other words, if find 1 false, return false
Exists : Only all element in s: Set fail the p-condition, return false || any 1 element pass the p-condition return true In other words, if find 1 true, return true
the relationship between exists and forall , flipped condition and flipped the result will be the other one