toMaybe :: [a] -> Maybe a toMaybe [] = Nothing toMaybe (x:xs) = Just x
toMaybe is a natural transformation. It is also a morphism from [] to Maybe in the Category of \(\Hask\) endofunctors.
toMaybe
[]
Maybe