Array Documentation (set intersection, union)
- Most know what intersection means, but saying the operation excludes duplicates could be misleading (
 & , duplicates excluded, might mean a result of
- Instead, saying intersection returns the unique elements common to both arrays is more concise and less ambiguous.
- The set union's documentation was incomplete in its describing preservation of order. Saying union preserves the order of the original array neglects the idea that the order of the elements in both arrays, as given, will be preserved.
- Instead, saying set union preserves the order from the given arrays (and adding an example) fully demonstrates the idea.
- Adds an example I think better demonstrates the preservation of order:
[ "c", "d", "a" ] | [ "a", "b", "c" ] #=> [ "c", "d", "a", "b" ]