What I don't get is the definition of reverse:

Shouldn't it be

reverse' = foldr (\x xs -> xs++[x]) []