foldl via foldr