Replace useless foldl for iterate