Created
October 9, 2015 18:43
-
-
Save sam/17ccbdd10644548ede6b to your computer and use it in GitHub Desktop.
Trying to come up with an Extractor I can pass input to other than my match object.
This file contains hidden or 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
case class Contains(test: String) { | |
def unapply(list: List[_]): Boolean = list contains test | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works for example: