title: Ordering and Ordered and comparing Options
body: <p>Given:</p>
  
  <pre><code>case class Person(name: String)
  </code></pre>
  
  <p>and trying to do:</p>
  
  <pre><code>scala&gt; List(Person("Tom"), Person("Bob")).sorted
  </code></pre>
  
  <p>results in a complaint about missing Ordering.</p>
  
  <pre><code>&lt;console&gt;:8: error: could not find implicit value for parameter ord: Ordering[Person]
     List(Person("Tom"), Person("Bob")).sorted
  </code></pre>
  
  <p>However this:</p>
  
  <pre><code>case class Person(name: String) extends Ordered[Person] {
    def compare(that: Person) = this.name compare that.name }
  </code></pre>
  
  <p>works fine as expected: </p>
  
  <pre><code>scala&gt; List(Person("Tom"), Person("Bob")).sorted
  res12: List[Person] = List(Person(Bob), Person(Tom))
  </code></pre>
  
  <p>although there's no Ordering or implicits involved.</p>
  
  <p><em>Question #1:</em> what's going on here? (My money is on something implicit...)</p>
  
  <p>However, given the above and the fact that this:</p>
  
  <pre><code>scala&gt; Person("Tom") &gt; Person("Bob")
  res15: Boolean = true
  </code></pre>
  
  <p>works, and that also this:</p>
  
  <pre><code>scala&gt; List(Some(2), None, Some(1)).sorted
  </code></pre>
  
  <p>works out of the box:</p>
  
  <pre><code>res13: List[Option[Int]] = List(None, Some(1), Some(2))
  </code></pre>
  
  <p>I would expect that this:</p>
  
  <pre><code>scala&gt; Some(2) &gt; Some(1)
  </code></pre>
  
  <p>would also work, however it does not:</p>
  
  <pre><code>&lt;console&gt;:6: error: value &gt; is not a member of Some[Int]
         Some(2) &gt; Some(1)
  </code></pre>
  
  <p><em>Question #2:</em> why not, and how can I get it to work?</p>