There's more...

I would also like to bring to your attention another aspect that needs clarification. This approach may seem trivial and surmountable in other ways, if we look at the specific example of the recipe; we could have iterated with a for loop and a counter, checked if the number is prime, and so on. We would have had the same results. But what happens if the container, as we have supposed, very large or infinite is not of numbers? This approach continues to work and gives the same advantages regardless of the type of data container.