What we want for Map is definitely not that, but rather
??? :: Ord k => k -> Map k v -> Maybe (k, v)
In each case we look up a key to retrieve an "entry" (whether we want that terminology or not). In the case of a Map, the entry is a key-value pair; in the case of a Set it is merely a key.
Correction, there are several errors in the signatures at the end of my last message.
> lookup??? :: Eq a => a -> [a] -> Maybe a
> lookup??? :: Ord a => a -> Set a -> Maybe a
Also, copying the pattern for maps gives a slightly stranger signature
> lookup??? :: (Ord k, Eq a) => (k,a) -> Map k a -> Maybe (k,a)
which combines a key lookup with an equality test on the value.
Nicolas.
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries