Created
February 17, 2017 09:38
-
-
Save andr83/f13478a9f132c51b7bd240dd86c147be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class T(x: Int, y: Int) | |
val tOrdering = Ordering.fromLessThan[T](_.x > _.x) | |
var tree = scala.collection.immutable.TreeSet.empty(tOrdering) | |
tree = tree + T(10,2) | |
tree = tree + T(1,2) | |
tree = tree + T(1,3) | |
tree = tree + T(5,3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment