Hi,
In message "Re: operator - on list should be O(n) on sorted lists"
on 03/02/02, Brian Candler <B.Candler / pobox.com> writes:
|['h','e','l','l','o']-['e']
|=> ["h", "l", "o"]
|
|So, A-[] is not a null operation :-(
|
|I'm sure there must be a reason for this. It seems that an Array is also
|intended to be a poor man's Set, but as you've found, it doesn't do that job
|very well.
The reason is exactly as you guessed. But your example made me think
it is overkill for '-' operation (since "-" is not a Set operation).
Can I change this?
The operator "|" and "&" will not change this behavior of removing
duplicates, since they still are operations for "poor man's Set".
matz.