Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Created March 4, 2011 15:56
Show Gist options
  • Save xuwei-k/854858 to your computer and use it in GitHub Desktop.
Save xuwei-k/854858 to your computer and use it in GitHub Desktop.
scala> 1 to 5 toList
res0: List[Int] = List(1, 2, 3, 4, 5)
scala> (res0,res0.tail)zip
res1: List[(Int, Int)] = List((1,2), (2,3), (3,4), (4,5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment