Skip to content

Instantly share code, notes, and snippets.

@leifwickland
Created March 18, 2015 16:50
Show Gist options
  • Save leifwickland/9c2529f2cb1ef94de486 to your computer and use it in GitHub Desktop.
Save leifwickland/9c2529f2cb1ef94de486 to your computer and use it in GitHub Desktop.
def f(s: String) = {
s.split(':') match {
case Array(k,v) => k -> v
case a => error("bad: " + a)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment