
27 Jul
2002
27 Jul
'02
8:34 a.m.
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 correct.) Christian