Module Set

Christian Maeder maeder@Informatik.Uni-Bremen.DE
Sat, 27 Jul 2002 14:34:12 +0200

> I think the module Set lacks at least a (partial) function
>         minimum  :: forall a. (Ord a) => Set a -> a
> because "setToList" is the only (though sufficient) function to access
> the elements of a list. Will "minimum = head . setToList" be correct or
> do I need to sort the list?

Surely "setToList" must yield a sorted list otherwise it was not a
(pure) function. (and as I tried out, the above minimum definition is