How in Scala to find unique items in List?
Imho, all the interpretations of the question are false:
How in Scala to find unique items in List?
Given this list:
val ili = List (1, 2, 3, 4, 4, 3, 1, 1, 4, 1)
the only unique item in the list is 2. The other items aren't unique.
ili.toSet.filter (i => ili.indexOf (i) == ili.lastIndexOf (i))
will find it.