HaloO, Jonathan Lang wrote:
Note that this would mean that Seq would also have set operations.
I count this as an advantage. So one can write (1,2,3) (|) (2,2,3,4,4) to get a result of (1,2,2,3,4,4). As long as the Seq is a Set, that is it has no duplicates, you get Set behavior through the Bag ops: (1,2,3) (|) (2,3,4) === (1,2,3,4); (1,2,3) (&) (2,3,4) === (2,3). BTW, the set/bag operations are not yet mentioned in S03 as new operators. Here's a list what I think they should be: (|) union (&) intersection (^) symmetric difference (/) disjoint union? (!) complement, this is difficult because you need the surrounding set (-) difference (+) join, returns a bag (*) cartesian product (**) powerset (in) membership (!in) negated membership (<) proper subset (>) proper superset (<=) subset (>=) superset (=) equality, also with === (!=) inequality, also with !=== Did I forget something? Regards, TSa. --