Proposal for containers: Add 'lookup' function to Data.Set

Nicolas Godbout nicolas.godbout at gmail.com
Mon Jul 4 15:48:25 UTC 2016


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.



More information about the Libraries mailing list