This is how the right fold is implemented:
foldr :: (a -> b -> b) -> b -> [a] -> b
foldr f z [] = z
foldr f z (x:xs) = f x (foldr f z xs) -- = x `f` foldr f z xs
The right fold, foldr, associates to the right. That is:
foldr (+) 0 [1, 2, 3] -- is equivalen...