Make acc the last arg in foldr