Skip to content

Instantly share code, notes, and snippets.

@nuttycom
Created November 5, 2014 03:52
Show Gist options
  • Save nuttycom/b0193fc1706d702f3b61 to your computer and use it in GitHub Desktop.
Save nuttycom/b0193fc1706d702f3b61 to your computer and use it in GitHub Desktop.
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