filterElement :: (a -> Bool) -> [a] -> Maybe a
filterElement f list = let filtered = filter f list
                          in if length filtered > 0
                                then Just $ head filtered
                                else Nothing
filterElement :: (a -> Bool) -> [a] -> Maybe a
filterElement f list = let filtered = filter f list
                          in if length filtered > 0
                                then Just $ head filtered
                                else Nothing
filterElement f list = let filtered = filter f list
                          in if length filtered > 0
                                then Just $ head filtered
                                else Nothing