Skip to content

Instantly share code, notes, and snippets.

@clhodapp
Created February 29, 2012 05:29
Show Gist options
  • Save clhodapp/1938188 to your computer and use it in GitHub Desktop.
Save clhodapp/1938188 to your computer and use it in GitHub Desktop.
Ordering Example
case class A(x: Int)
implicit object AIsOrdered extends Ordering[A] {
def compare(x: A, y: A) = x.x - y.x
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment