Skip to content

Instantly share code, notes, and snippets.

@fumokmm
Created May 17, 2010 19:31
Show Gist options
  • Save fumokmm/404136 to your computer and use it in GitHub Desktop.
Save fumokmm/404136 to your computer and use it in GitHub Desktop.
scala> val list = List(1, 2, 3)
list: List[Int] = List(1, 2, 3)
scala> val List(a, b, c) = list
a: Int = 1
b: Int = 2
c: Int = 3
scala> a
res1: Int = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment