Guest User

Untitled

a guest
Mar 4th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.18 KB | None | 0 0
  1. object ListSort extends App {
  2.   val list = Seq((5,1), (1,2), (3,3), (2,5), (4,6), (6,4))
  3.   val sortedList = list sortBy {_._1}
  4.   for (item <- sortedList) {
  5.     println(item)
  6.   }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment