public
anonymous / example.scala
Created

  • Download Gist
example.scala
Scala
1 2 3 4
val IsStooge = """(Moe|Larry|Curly|Shemp)""".r
def stooge = """\w+""".r ^? (
{ case IsStooge(s) => s },
{ "not a stooge: " + _ })

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.