Created
November 9, 2017 00:59
-
-
Save Svetixbot/9e1a959df9dc1896d3a857745d61d1a5 to your computer and use it in GitHub Desktop.
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
val isAlienLanguage = "([a-zA-Z]+) (is) (.*)".r | |
/*** | |
* glob is I | |
*/ | |
def parseAlien(statement: String): PartialFunction[String, AlienLanguageStatement] = { | |
case isAlienLanguage(word, _, roman) => AlienLanguageStatement(word, roman) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment