Created
November 5, 2014 03:52
-
-
Save nuttycom/b0193fc1706d702f3b61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Foo { | |
def unapply(a: ASup): Option[B] = | |
a match { | |
case a0: A => a0.b match { case b: B => Some(b); case _ => None } | |
case _ => None | |
} | |
} | |
ax collect { case Foo(b) => ... } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment