Who else is constantly tripping over the fact that seq.forall(predicate) always returns true when seq.isEmpty?
-
-
@dibblego@puffnfresh@etorreborre forall = fold (&&) True -
@MosRobinson@puffnfresh@etorreborre True is the identity for (&&).
End of conversation
New conversation -
-
-
@dibblego@puffnfresh no just that I sometimes forget that it is not what I want and should use exist(!predicate) instead -
@etorreborre@dibblego@puffnfresh it's the same reason that Seq[Int]().product = 1 - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.