safeHead :: [x] -> Maybe x
safeHead [] = Nothing
safeHead (x : _) = Just x