I'm currently learning Scala. Since I don't like to use `Int` for the result of a comparison (such as `Ordered.compareTo` does), I tried to come up with a way to replace it. This is what I came up with:

```
sealed trait ComparisonResult

case object LessThan extends ComparisonResult
case object GreaterThan extends ComparisonResult
case object Equal extends ComparisonResult

object ComparisonImplicits {
  implicit def Int2ComparisonResult(value: Int) = value match {
    case v if v < 0 => LessThan
    case v if v > 0 => GreaterThan
    case _ => Equal
  }
}

```

Then I can write things like

```
val comparison: ComparisonResult = a compareTo b
comparison match {
  case LessThan => ...
  case GreaterThan => ...
  case Equal => ...
}

```

Unfortunately, I have to store the `Int` in a `val` of type `ComparisonResult` for this to work. E.g. `if (a.compareTo(b) == LessThan)` doesn't work.

Is there a better or more idiomatic way to do this?