Use for instead of foldr