-- Try writing it in terms of the maybe catamorphism. 

-- 4. Converting between List and Maybe. 

-- listToMaybe [1, 2, 3]
-- Just 1

-- listToMaybe []
-- Nothing

listToMaybe :: [a] -> Maybe a
listToMaybe [] = Nothing
listToMaybe :: [a] -> Maybe a
listToMaybe [] = Nothing
listToMaybe [] = Nothing