Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Why the partial function case (a,Some(b)) => (a,b) inside the collect doesn't trigger MatchError if there is None value in one of parameters? Commented Jan 16, 2015 at 18:35
  • 1
    that's how collect method works it takes only elements on which the function is defined. See isDefinedAt Commented Jan 21, 2015 at 14:03
  • @suud belated a comment, sorry :) Note collect takes only elements that match a defined case; as a partial function it defines, it needs not all cases be covered, namely for instance case _ may be ommitted. Commented Jan 21, 2015 at 15:50
  • @suud, enzyme no probs :) Commented Jan 21, 2015 at 15:56