Replaces iterations with comprehensions.