Your solution is working and valid, so I won't comment on it. You already use val
and immutable data structures, which is the pure way of doing it.
I will instead suggest an alternative way that is a slightly shorter and might also interest you:
Since you preprocess your list anyway, I suggest you to sort it lexicographically in the first place: First by descending attr1, and in case of a tie, by ascending attr2:
scala> val originalList = Seq((1,0), (2,7), (3,1), (1,3), (2,5), (3,4), (3,2))
scala> val lst = originalList.sortBy(x => (-x._1, x._2))
lst: Seq[(Int, Int)] = List((3,1), (3,2), (3,4), (2,5), (2,7), (1,0), (1,3))
Now you just have to take the duplicates from the front and the result is already sorted by attr2:
scala> lst.takeWhile(_._1 == lst.head._1)
res8: Seq[(Int, Int)] = List((3,1), (3,2), (3,4))