Suppose I have two lists:
val a = List(\'a\', \'b\', \'c\') val b = List(\'a\', \'b\', \'c\', \'d\')
I want to get the element which is not in
You can use diff for this:
diff
scala> b diff a res1: List[Char] = List(d)
You probably want to work with Set if you are doing diff.
Set