-
Couldn't load subscription status.
- Fork 69
Closed
Description
This seems weird:
union [0, 0] [1, 1] == [0, 0, 1]I would have expected the result to be [0, 1], but at least it should be symmetrical in both arguments. I would consider several possible fixes:
- Remove all duplicates (i.e.
union a b == nub (a <> b)) - Keep the duplicates within both of the arguments (i.e.
union [0, 0] [1, 1] == [0, 0, 1, 1]). - Remove
unionandunionByfromData.Array(given thatSetis the better data structure for something like this) - Document the behavior if it is intended
I would vote for 1 or 3.
Metadata
Metadata
Assignees
Labels
No labels