What would be Iteration?

Asked

Viewed 684 times

4

In a question I asked, I questioned what it was and what would be the function of ListIterator, then came the term iteration, what would that be?

Link to question

1 answer

7


iteration | s. f. fem derivation. Sing. to iterate

i te ra substantive female

Replay.

"iteration", in Dicionário Priberam da Língua Portuguesa [online], 2008-2013, https://www.priberam.pt/dlpo/itera%C3%A7%C3%A3o [consulted on 20-02-2017].

Maybe the word "iterate" sounds new, but you’ve probably heard "reiterate". I think everyone understands that "re-iterate" is repeating the iteration. That is to repeat what should already be known, because it has been done once or more times before. To reiterate is to iterate again after the first iteration, is something separate from the original iteration. An iteration occurs together.

In computation every block of commands that is repeating its execution infinitely or with the closure at a given moment meeting some condition is an iteration.

Widely used to traverse all, or part of, elements of a data sequence.

This technique is opposed to recursion which is a different mechanism that achieves the same result.

Then a for, foreach, while, do...while, repeat...until, goto backward, loop, each, dolist, PERFORM, etc. tosos they are syntaxes of the mechanism that causes iterations in the code.

So it’s just a nicer way of saying you’re gonna say it again.

We can say "make an increment in each iteration" which is the same as "make an increment in each repetition" or "make an increment every time you make a loop in the loop"

In that context is just this, I was talking to repeat every time you execute the entire block of commands contained therein.

Therefore the iterator is the mechanism that does or collaborates in the repetition. Either it is managed by the language (when it compiles/interprets) or it is a library object that manages repetitions indicating where it is and whether to stop.

  • Perfect explanation, simple language and easy to understand

Browser other questions tagged

You are not signed in. Login or sign up in order to post.