filterElement :: (a -> Bool) -> Set a -> Maybe a
filterElement f set = let filtered = S.filter f set
                          in if size filtered > 0
                                then Just $ (head . toList) filtered
                                else Nothing
filterElement :: (a -> Bool) -> Set a -> Maybe a
filterElement f set = let filtered = S.filter f set
                          in if size filtered > 0
                                then Just $ (head . toList) filtered
                                else Nothing
filterElement f set = let filtered = S.filter f set
                          in if size filtered > 0
                                then Just $ (head . toList) filtered
                                else Nothing