For example list is:
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))))
Then how to get output using scala: (wanna to add the values: for ex: 1000+ 500 and 800+420)
How to get result in sorted order by value.
Name(1, 1500)andName(1, List(User(A, 1000), User(B, 500)))has different classes definitions but same names. You can't have 2 classes in a package with the same name.