Couldn't we do this?
r' f (x:xs) | xs == [] = (f x):[] | otherwise = (f x):(r' f xs)
or:
[(f a) | a <- myList]
- another edit -
r' f (x:xs) | xs == [] = x | otherwise = f x (r' f xs)
r' f (x:xs) | xs == [] = (f x):[] | otherwise = (f x):(r' f xs)
or:
[(f a) | a <- myList]
- another edit -
r' f (x:xs) | xs == [] = x | otherwise = f x (r' f xs)