Using Set in the first place is the right way to do this, of course, but:
scala> List("a", "b", "a", "c").toSet.toList res1: List[java.lang.String] = List(a, b, c)
Works. Or just toSet as it supports the interface Seq Traversable .
zentrope Aug 21 2018-11-21T00: 00Z
source share