The Set type

George Russell ger@Informatik.Uni-Bremen.DE
Mon, 04 Dec 2000 17:09:36 +0100


A minor quibble I know, but every time I use sets I want to add/subtract single elements
to/from them.  There is no function provided for doing this, so instead you have to do
union/delete with a singleton set constructed from the element.  I appreciate the zeal
of the designer of this module to construct the smallest possible interface (I wish the
same person had designed the standard Prelude) but I think this zeal is overdone.
You do often need to operate with single elements.  After all, if you wanted real 
hair-shirt minimalism you should get rid of "elementOf" (replace it by 
\el set -> isEmptySet (intersect set (singletonSet el)), but no-one would seriously
suggest that - I hope.