module Maybe where listToMaybe :: [a] -> Maybe a listToMaybe [] = Nothing listToMaybe (a:as) = Just a