title: Creating a new Ord instance for Lists
body: <p>This is my first attempt at creating a custom instance of a class such as Ord.</p>
  
  <p>I've defined a new data structure to represent a list:</p>
  
  <pre><code>data List a = Empty | Cons a (List a)
      deriving (Show, Eq)
  </code></pre>
  
  <p>Now I want to define a new instance of Ord for List such that List a &lt;= List b implies "the sum of the elements in List a is less than or equal to the sum of the elements in List b"</p>
  
  <p>first of all, is it necessary to define a new "sum" function since the sum defined in Prelude wont work with the new List data type? then, how do I define the new instance of Ord for List?</p>
  
  <p>thanks</p>