title: how to add values of list in scala
body: <p>For example list is: </p>
  
  <pre><code>case class User(s: String, value: Int)
  case class Name(i: Int, users: List[User])
  
  List(Name(1, List(User("A", 1000), User("B", 500))), Name(2, List(User("A", 800),   User("B", 420))))
  </code></pre>
  
  <p>Then how to get output using scala:
   (wanna to add the values: for ex: 1000+ 500 and 800+420)    </p>
  
  <p>How to get result in sorted order by value.</p>