Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Last active May 10, 2017 00:05
Show Gist options
  • Save dgadiraju/d33252f532b7c41ba0ba61f9c364d137 to your computer and use it in GitHub Desktop.
Save dgadiraju/d33252f532b7c41ba0ba61f9c364d137 to your computer and use it in GitHub Desktop.
os.sortBy(x => x.orderCustomerId)
os.sortWith((a, b) => {
if(a.orderCustomerId > b.orderCustomerId)
false
else if(a.orderCustomerId < b.orderCustomerId)
true
else {
if(a.orderId > b.orderId)
false
else
true
}
}
).foreach(println)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment