Knowledge

Iterator

Source πŸ“

2515: 25: 712:
directly to the data elements. But this approach will negatively impact the iterator performance, since it must effectuate a double pointer following to access the actual data element. This is usually not desirable, because many algorithms using the iterators invoke the iterators data access operation more often than the advance method. It is therefore especially important to have iterators with very efficient data access.
2046:
This approach does not properly separate the advance operation from the actual data access. If the data element must be used more than once for each advance, it needs to be stored in a temporary variable. When an advance is needed without data access (i.e. to skip a given data element), the access is
1424:
Iterator types are separate from the container types they are used with, though the two are often used in concert. The category of the iterator (and thus the operations defined for it) usually depends on the type of container, with for instance arrays or vectors providing random access iterators, but
715:
All in all, this is always a trade-off between security (iterators remain always valid) and efficiency. Most of the time, the added security is not worth the efficiency price to pay for it. Using an alternative collection (for example a singly linked list instead of a vector) would be a better choice
711:
An alternative way to keep the number of updates bound relatively to the collection size would be to use a kind of handle mechanism, that is a collection of indirect pointers to the collection's elements that must be updated with the collection, and let the iterators point to these handles instead of
707:
For collections that may move around their data in memory, the only way to not invalidate the iterator is, for the collection, to somehow keep track of all the currently alive iterators and update them on the fly. Since the number of iterators at a given time may be arbitrarily large in comparison to
5183:
An internal iterator is implemented by the member functions of the class which has the iteration logic. An external iterator is implemented by a separate class which can be attached to the object which has iteration logic. The advantage of external iterator is that, many iterators can be made active
1177:
needed to transform the lower limit into the upper one, equals the number of items in the designated range; the number of distinct iterator values involved is one more than that. By convention, the lower limiting iterator "points to" the first element in the range, while the upper limiting iterator
5321:
An index only can be used for containers that (efficiently) support random access (i.e. direct access to an element at a given position). An iterator is a more general concept. Iterators offer efficient traversal of linked lists, files, and a number of other data structures. It often leads to the
4395:
Ruby implements iterators quite differently; all iterations are done by means of passing callback closures to container methods - this way Ruby not only implements basic iteration but also several patterns of iteration like function mapping, filters and reducing. Ruby also supports an alternative
2473:
Alternatively, it may be desirable to abstract the mechanisms of the array storage container from the user by defining a custom object-oriented MATLAB implementation of the Iterator Pattern. Such an implementation supporting external iteration is demonstrated in MATLAB Central File Exchange item
694:
An iterator may allow the collection object to be modified without invalidating the iterator. For instance, once an iterator has advanced beyond the first element it may be possible to insert additional elements into the beginning of the collection with predictable results. With indexing this is
1456:
that modify the structure of the container itself; these are methods of the container class, but in addition require one or more iterator values to specify the desired operation. While it is possible to have multiple iterators pointing into the same container simultaneously, structure-modifying
703:
programming, where the interrelationships between objects and the effects of operations may not be obvious. By using an iterator one is isolated from these sorts of consequences. This assertion must however be taken with a grain of salt, because more often than not, for efficiency reasons, the
2333:
In the case of internal iteration where the user can supply an operation to the iterator to perform over every element of a collection, many built-in operators and MATLAB functions are overloaded to execute over every element of an array and return a corresponding output array implicitly.
2253:
object provides implicit conversions to do this. Implicit conversions are a feature of Scala: methods that, when visible in the current scope, automatically insert calls to themselves into relevant expressions at the appropriate place to make them typecheck when they otherwise would not.
1437:, and yet another type is provided for "reverse iterators", whose operations are defined in such a way that an algorithm performing a usual (forward) traversal will actually do traversal in reverse order when called with reverse iterators. Most containers also provide a separate 1150:, in order of increasing possibilities. All of the standard container template types provide iterators of one of these categories. Iterators generalize pointers to elements of an array (which indeed can be used as iterators), and their syntax is designed to resemble that of 236:
values to its caller multiple times, instead of returning just once. Most iterators are naturally expressible as generators, but because generators preserve their local state between invocations, they're particularly well-suited for complicated, stateful iterators, such as
645:– they provide a potentially infinite iterable (but not necessarily indexable) object. Several languages, such as Perl and Python, implement streams as iterators. In Python, iterators are objects representing streams of data. Alternative implementations of stream include 594:
This iteration style is sometimes called "internal iteration" because its code fully executes within the context of the iterable object (that controls all aspects of iteration), and the programmer only provides the operation to execute at each step (using an
3967:, which allows for a finer operation of iteration in several contexts such as adding or eliminating items, or skipping over them to access other items. Thus, any user-defined class can support standard iteration by composing these roles and implementing the 1457:
operations may invalidate certain iterator values (the standard specifies for each case whether this may be so); using an invalidated iterator is an error that will lead to undefined behavior, and such errors need not be signaled by the run time system.
190:
An iterator allows a consumer to process each element of a collection while isolating the consumer from the internal structure of the collection. The collection can store elements in any manner while the consumer can access them as a sequence.
1172:
Traversal using iterators usually involves a single varying iterator, and two fixed iterators that serve to delimit a range to be traversed. The distance between the limiting iterators, in terms of the number of applications of the operator
2269:
arrays. In the case of external iteration where the onus is on the user to advance the traversal and request next elements, one can define a set of elements within an array storage structure and traverse the elements using the
5099:
A user-defined iterator usually takes the form of a code reference that, when executed, calculates the next item in a list and returns it. When the iterator reaches the end of the list, it returns an agreed-upon
2054:
method of the iterator removes the most recently visited element from the container while keeping the iterator usable. Adding or removing elements by calling the methods of the container (also from the same
187:). It also provides for creation and initialization to a first element and indicates whether all elements have been traversed. In some programming contexts, an iterator provides additional functionality. 194:
In object-oriented programming, an iterator class is usually designed in tight coordination with the corresponding collection class. Usually, the collection provides the methods for creating iterators.
3137:
constant allows PHP scripts to iterate result sets with billions of rows with very little memory usage. These features are not exclusive to PHP nor to its MySQL class implementations (e.g. the
688:
Iterators can provide a consistent way to iterate on data structures of all kinds, and therefore make the code more readable, reusable, and less sensitive to a change in the data structure.
5477: 2532:
was introduced in version 4.0 and made compatible with objects as values in 4.0 Beta 4. However, support for iterators was added in PHP 5 through the introduction of the internal
1425:
sets (which use a linked structure as implementation) only providing bidirectional iterators. One same container type can have more than one associated iterator type; for instance the
1122:" statement to produce a sequence of elements instead of returning an object instance, will be transformed by the compiler into a new class implementing the appropriate interface. 1735:
syntax can be used to specify to operation to be iterated inline, avoiding the need to define a named function. Here is an example of for-each iteration using a lambda function:
691:
An iterator can enforce additional restrictions on access, such as ensuring that elements cannot be skipped or that a previously visited element cannot be accessed a second time.
3825:
Iterators however can be used and defined explicitly. For any iterable type, there are several methods that control different aspects of the iteration process. For example, the
2199:, iterators have a rich set of methods similar to collections, and can be used directly in for loops. Indeed, both iterators and collections inherit from a common base trait - 5584:
C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build Applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET Using Visual Studio Code
1489:, that define the range over which iteration occurs. But no explicit iterator object is subsequently exposed as the iteration proceeds. This example shows the use of 2078:
with a similar API but that allows forward and backward iteration, provides its current index in the list and allows setting of the list element at its position.
3289:
types support iteration, as well as many classes that are part of the standard library. The following example shows typical implicit iteration over a sequence:
627:. These functions still require explicit iterator objects as their initial input, but the subsequent iteration does not expose an iterator object to the user. 511:
way of iterating through the elements of a collection without an explicit iterator. An iterator object may exist, but is not represented in the source code.
2059:) makes the iterator unusable. An attempt to get the next element throws the exception. An exception is also thrown if there are no more elements remaining ( 3586:
are a fundamental part of the language, although usually users do not have to care about iterators. Their usage is hidden behind iteration APIs such as the
5414: 5334: 5235: 5196: 704:
iterator implementation is so tightly bound to the collection that it does preclude modification of the underlying collection without invalidating itself.
936:
method, to rewind the enumerator back to its initial position. The enumerator initially points to a special value before the first element, so a call to
3449:
exception will be raised when no more elements are left. The following example shows an equivalent iteration over a sequence using explicit iterators:
5781: 2218:
Java iterators and collections can be automatically converted into Scala iterators and collections, respectively, simply by adding the single line
241:. There are subtle differences and distinctions in the use of the terms "generator" and "iterator", which vary between authors and languages. In 1186:
the upper limit. The latter does not reference any element of the container at all but is a valid iterator value that can be compared against.
5481: 955:
property, to obtain the value of the element currently being pointed at;Container classes typically implement this interface. However, the
2478:. This is written in the new class-definition syntax introduced with MATLAB software version 7.6 (R2008a) and features a one-dimensional 2514: 5131:
Iterators were introduced as constructs to allow looping over abstract data structures without revealing their internal representation.
3441:
method internally, which returns the next element in the container. (The previous statement applies to Python 3.x. In Python 2.x, the
2486:(ADT) as the mechanism for storing a heterogeneous (in data type) set of elements. It provides the functionality for explicit forward 3841:
if no more values could be produced. The following example shows an equivalent iteration over a collection using explicit iterators:
246: 1904:
method advances the iterator and returns the value pointed to by the iterator. The first element is obtained upon the first call to
708:
the size of the tied collection, updating them all will drastically impair the complexity guarantee on the collection's operations.
1178:
does not point to any element in the range, but rather just beyond the end of the range. For traversal of an entire container, the
5451: 2105: 1883: 141: 1889: 3571: 3282: 1877: 5591: 5523: 5266: 2074: 5766: 669:
to access each element. Although indexing may be used with collections, the use of iterators may have advantages such as:
606:
or similar constructs may also make use of implicit iterators during the construction of the result list, as in Python:
5845: 5629: 5557: 2087: 1867: 729:
Iterators can be categorised according to their functionality. Here is a (non-exhaustive) list of iterator categories:
147:
An iterator is often implemented in terms of the structure underlying a collection implementation and is often tightly
89: 5840: 5047: 3429:
Iterators however can be used and defined explicitly. For any iterable sequence type or class, the built-in function
1444:
Simple traversal of a container object or a range of its elements (including modification of those elements unless a
108: 61: 2565: 2068: 1138:
and describes several categories of iterators differing in the repertoire of operations they allow. These include
5223:
Some authors use the term iterator, and others the term generator. Some make subtle distinctions between the two.
3286: 2082: 148: 134: 5252:
Freeman, Eric; Freeman, Elisabeth; Kathy, Sierra; Bert, Bates (2004). Hendrickson, Mike; Loukides, Mike (eds.).
2536:
interface. The two main interfaces for implementation in PHP scripts that enable objects to be iterated via the
68: 2548:. The latter does not require the implementing class to declare all required methods, instead it implements an 1165:
operators are used to reference the element to which the iterator points and pointer arithmetic operators like
960: 928:
method, which advances to the next element and indicates whether the end of the collection has been reached; a
699:
The ability of a collection to be modified while iterating through its elements has become necessary in modern
472: 46: 3207:// The \mysqli_result class that is returned by the method call implements the internal Traversable interface. 1460:
Implicit iteration is also partially supported by C++ through the use of standard function templates, such as
5214:. The University of Western Ontario, Department of Computer Science. Archived from the original on 2012-08-06 3266: 851: 500: 242: 5850: 2196: 225: 215: 2043:
can be called repeatedly, we use it to insert commas between the elements but not after the last element.
1441:
type, for which operations that would allow changing the values pointed to are intentionally not defined.
75: 3583: 1862: 877: 673:
Counting loops are not suitable to all data structures, in particular to data structures with no or slow
504: 488: 5825: 5645: 5393: 492: 162: 3331:
method of a dictionary can be iterated over where it yields corresponding key,value pairs as a tuple:
3269:
are a fundamental part of the language and in many cases go unseen as they are implicitly used in the
249:: a function that returns an iterator. An example of a Python generator returning an iterator for the 2342:
functions can be leveraged for performing custom or user defined operations over "native" arrays and
2056: 789: 484: 57: 42: 5211: 5171: 5687: 5056: 3555:
Any user-defined class can support standard iteration (either implicit or explicit) by defining an
1151: 803:
Different languages or libraries used with these languages define iterator types. Some of them are
5806: 3837:
method is supposed to produce and return the next value if possible, or return the sentinel value
2203:. However, because of the rich set of methods available in the Scala collections library, such as 1732: 976: 5796: 5686:
Internal refers to the fact that the interface cannot be implemented in PHP scripts, only in the
646: 35: 5156:
You can think of an iterator as pointing to an item that is part of a larger container of items.
4693:
trait and return an associated iterator type for their elements, enabling their use directly in
1893:
method. Iterators are created by the corresponding container class, typically by a method named
5309: 5116: 2475: 1135: 407:) that traverses a collection while applying a function to each element. For example, Python's 206:, however, only provides the traversal functionality and not the element access functionality. 5787: 1635: 1448:
is used) can be done using iterators alone. But container types may also provide methods like
400: 5821: 5811: 5429: 5349: 3060:
All methods of the example class are used during the execution of a complete foreach loop (
2561: 2215:
etc., it is often not necessary to deal with iterators directly when programming in Scala.
122: 5816: 5288: 5144: 8: 1474: 972: 932:
property, to obtain the value of the element currently being pointed at. and an optional
682: 665:
Instead of using an iterator, many languages allow the use of a subscript operator and a
404: 5771: 3433:
is used to create an iterator object. The iterator object can then be iterated with the
5455: 4536:
Rust makes use of external iterators throughout the standard library, including in its
3278: 2576: 2265:
supports both external and internal implicit iteration using either "native" arrays or
1462: 1154: 636: 603: 596: 508: 155: 130: 5777: 5087: 82: 5625: 5587: 5553: 5519: 5408: 5328: 5262: 5229: 5190: 3324: 1429:
container type allows traversal either using (raw) pointers to its elements (of type
5493:β€’The iterator types iterator and const_iterator are of the forward iterator category 4612:
method, which returns an iterator that in turn yields the elements to the loop. The
3605:
The following example shows typical implicit iteration over a collection of values:
3327:) can also be directly iterated over, when the dictionary keys are returned; or the 5253: 3559:
method that returns an iterator object. The iterator object then needs to define a
2487: 2483: 1468: 678: 250: 174: 5791: 5065: 3990:
role. The DNA strand is split into a group of trinucleotides when iterated over:
963:
can operate on any object providing such a method, even if it does not implement
700: 5801: 5742: 5666: 2549: 913: 238: 5050: β€“ Reusable design for writing code that provides a well-defined function 5834: 5371: 674: 480: 5394:"Types of iterator: Output vs. input vs. forward vs. random access iterator" 4616:
loop (or indeed, any method that consumes the iterator), proceeds until the
2571:
The simplest implementation is by wrapping an array, this can be useful for
1912:
test method is used. The following example shows a simple use of iterators:
1908:. To determine when all the elements in the container have been visited the 5700: 2564:
provides several classes to work with special iterators. PHP also supports
2526: 666: 642: 203: 199: 183:) and can change its internal state to provide access to the next element ( 3669:
method can be invoked on the hash to iterate over the key and values; the
2047:
nonetheless performed, though the returned value is ignored in this case.
968: 144:
that provide items in different orders, such as forwards and backwards.
5721: 716:(globally more efficient) if the stability of the iterators is needed. 461:# Iterating over this iterator would result in 0, 1, 4, 9, 16, ..., 81. 229: 151:
to the collection to enable the operational semantics of the iterator.
5174:. CareerRide.COM. 2009-04-03. Archived from the original on 2012-09-19 4685:
Users can create custom iterators by creating a type implementing the
3661:
Raku hashes can also be directly iterated over; this yields key-value
2572: 623:
language has a few function templates for implicit iteration, such as
221: 1481:
When used they must be initialized with existing iterators, usually
24: 5122:. The University of Western Ontario, Department of Computer Science 5042: 5172:"Difference between an external iterator and an internal iterator" 5480:. Intel Threading Building Blocks for Open Source. Archived from 5430:"Introduction to SPL: Introduction to Standard PHP Library (SPL)" 3274: 2096: 1728: 956: 516: 1938:// Iterator<MyType> iter = list.iterator(); // in J2SE 5.0 220:
One way of implementing an iterator is via a restricted form of
4635:
All collections provided by the standard library implement the
3064:). The iterator's methods are executed in the following order: 2262: 3071:
ensures that the internal structure starts from the beginning.
1413:// Print value of each element 'x' of 'items'. 1368:// In C++11, the same can be done without using any iterators: 1278:// Append integer value '9' to vector 'items'. 1257:// Append integer value '2' to vector 'items'. 1236:// Append integer value '5' to vector 'items'. 1169:
are used to modify iterators in the traversal of a container.
3121:
The next example illustrates a PHP class that implements the
1131: 839: 746: 620: 514:
An implicit iterator is often manifest in language syntax as
476: 557:
In Ruby, iteration requires accessing an iterator property:
411:
function applies a caller-defined function to each element:
4544:
method of an iterator until it is consumed. The most basic
496: 179:
An iterator provides access to an element of a collection (
3252:// Act on the returned row, which is an associative array. 1871:
interface allows the iteration of container classes. Each
1546:// Function that will process each item of the collection. 1189:
The following example shows a typical use of an iterator.
916:(i.e. C#) are called "enumerators" and represented by the 619:
Sometimes the implicit hidden nature is only partial. The
5396:. stackoverflow. Archived from the original on 2012-08-08 3963:
is more complex and provides a series of methods such as
2522: 982:
The following shows a simple use of iterators in C# 2.0:
820: 654: 650: 523:
In Python, a collection object can be iterated directly:
5646:"java.util: Interface Iterator<E>: Method Summary" 5212:"A Technique for Generic Iteration and Its Optimization" 5117:"A Technique for Generic Iteration and Its Optimization" 3129:
class to act upon the data before it is returned to the
1362:// And print value of 'items' for current index. 16:
Object that enables processing collection items in order
5251: 5052:
Pages displaying short descriptions of redirect targets
3107:
advances to the next element in the internal structure.
5788:
A Technique for Generic Iteration and Its Optimization
902: 133:
that progressively provides access to each item of a
5767:
Java's Iterator, Iterable and ListIterator Explained
5061:
Pages displaying wikidata descriptions as a fallback
2466:
to each element of an array using built-in function
2187:
methods but has no methods to modify the container.
1761:// A for-each iteration loop with a lambda function. 1758:// Any standard container type of ItemType elements. 1516:// Any standard container type of ItemType elements. 202:
is sometimes also referred to as a loop iterator. A
140:
A collection may provide multiple iterators via its
49:. Unsourced material may be challenged and removed. 5166: 5164: 2518:UML class diagram of the Iterator interface in PHP 2099:) loop for iterating over collections and arrays. 943:Enumerators are typically obtained by calling the 5312:. BYTES. Archived from the original on 2012-08-09 4678:, etc.) as methods provided automatically by the 3982:class represents a DNA strand and implements the 5832: 5413:: CS1 maint: bot: original URL status unknown ( 5333:: CS1 maint: bot: original URL status unknown ( 5234:: CS1 maint: bot: original URL status unknown ( 5195:: CS1 maint: bot: original URL status unknown ( 5147:. Cprogramming.com - Your resource for C and C++ 4655:is automatically provided an implementation for 4520:Ruby can also iterate over fixed lists by using 3673:method to iterate over the hash's keys; and the 3062:foreach ($ iterator as $ key => $ current) {} 2117:loop, the preceding example can be rewritten as 695:problematic since the index numbers must change. 5247: 5245: 5161: 4400:, the following three examples are equivalent: 2369:% Perform a custom operation over each element 2175:Some containers also use the older (since 1.0) 1419:// Both of the for loops print "529". 5184:simultaneously on the existing or same object. 4701:type implements a custom, unbounded iterator: 4528:method or doing a for each on them, as above. 3959:to be implemented by the composing class. The 4624:value (iterations yielding elements return a 5622:"Effective Java: Programming Language Guide" 5242: 5110: 5108: 4689:trait. Custom collections can implement the 4643:method). Iterators themselves implement the 1134:language makes wide use of iterators in its 5509: 5507: 5505: 5503: 5501: 4651:method. Furthermore, any type implementing 3228:'SELECT `a`, `b`, `c` FROM `table`' 2462:that implicitly applies custom subfunction 5427: 5369: 5347: 3677:method to iterate over the hash's values. 2050:For collection types that support it, the 5478:"concurrent_unordered_set Template Class" 5105: 2326:traverses an array of integers using the 1110:: a method that is declared as returning 660: 154:An iterator is behaviorally similar to a 109:Learn how and when to remove this message 5615: 5613: 5611: 5609: 5607: 5605: 5603: 5577: 5575: 5573: 5571: 5569: 5543: 5541: 5539: 5537: 5535: 5513: 5498: 5391: 5307: 3919:# stop if we reached iteration's end 3125:interface, which could be wrapped in an 2408:% Echo resulting array to Command Window 5289:"Glossary β€” Python 3.8.4 documentation" 5142: 5115:Watt, Stephen M. (September 16, 2006). 5085: 5059: β€“ concept in computer programming 3943:All iterable types in Raku compose the 471:Some object-oriented languages such as 5833: 5261:. Vol. 1. O'REILLY. p. 338. 4396:syntax for the basic iterating method 3955:is quite simple and only requires the 3563:method that returns the next element. 971:). Both interfaces were expanded into 641:Iterators are a useful abstraction of 373:# The generator constructs an iterator 5619: 5600: 5566: 5547: 5532: 5350:"C++ Iteratoren: Iterator-Kategorien" 2476:Design Pattern: Iterator (Behavioral) 1887:method, and may optionally support a 1182:method provides the lower limit, and 947:method of an object implementing the 5114: 4662:Iterators support various adapters ( 3285:. All of Python's standard built-in 466: 390: 47:adding citations to reliable sources 18: 5449: 5088:"Understanding and Using Iterators" 4647:trait, which requires defining the 2085:5.0 release of Java introduced the 1338:// Iterate through 'items'. 13: 5624:(third ed.). Addison-Wesley. 5322:generation of more efficient code. 3133:loop. The usage together with the 2513: 2346:arrays respectively. For example, 903:In different programming languages 14: 5862: 5778:Understanding and Using Iterators 5760: 5581: 5048:Design pattern (computer science) 4548:loop for example iterates over a 4540:loop, which implicitly calls the 3902:# grab iteration's next value 2091:interface to support an enhanced 719: 5209: 5086:Gatcomb, Joshua (Jun 16, 2005). 3829:method is supposed to return an 2318:% Echo integer to Command Window 2201:scala.collection.TraversableOnce 2063:has previously returned false). 940:is required to begin iterating. 23: 5735: 5714: 5693: 5680: 5659: 5638: 5470: 5443: 5421: 5385: 5363: 5068: β€“ Software design pattern 4639:trait (meaning they define the 3567: 3323:Python dictionaries (a form of 1629:The same can be achieved using 1433:), or values of a special type 1107: 34:needs additional citations for 5341: 5301: 5281: 5203: 5136: 5079: 2556:) that returns an instance of 2274:-loop construct. For example, 1435:std::vector<T>::iterator 165:programming language in 1974. 1: 5352:(in German). cppreference.com 5308:Vecerina, Ivan (2006-02-01). 5072: 4599:// Prints the numbers 0 to 41 2357:% Define an array of integers 2279:% Define an array of integers 1624:// A for-each iteration loop. 724: 245:, a generator is an iterator 5548:Skeet, Jon (23 March 2019). 3097:returned value is stored in 3087:returned value is stored in 232:, a generator coroutine can 216:Generator (computer science) 209: 7: 5745:. The PHP Group. 2013-06-20 5701:"The Traversable interface" 5669:. The PHP Group. 2000-02-20 5036: 4524:s and either calling their 3880:# grab iterator for @values 2458:defines a primary function 10: 5867: 5802:Boost C++ Iterator Library 5255:Head First Design Patterns 3765:"$ key: $ value" 3183:'host.example.com' 634: 213: 172: 168: 5846:Object (computer science) 5514:Albahari, Joseph (2022). 5031:// Prints 1, 2, 5, and 13 4608:loop will call a value's 3570:implement this iteration 3445:method is equivalent.) A 3437:function, which uses the 3260: 2482:array realization of the 2303:% ... do something with n 2257: 1639:value as third iterator: 630: 5841:Iteration in programming 5688:C (programming language) 5057:Range (computer science) 4703: 4554: 4485: 4451: 4402: 4192: 4182:class composes both the 3992: 3843: 3799:"$ key => " 3679: 3607: 3451: 3379: 3333: 3291: 3147: 3117:and the loop is aborted. 3085:$ iterator->current() 2581: 2348: 2276: 2220: 2190: 2119: 1914: 1737: 1641: 1495: 1191: 984: 885:Recursive array iterator 798: 608: 559: 525: 413: 259: 5392:larsmans (2011-03-06). 4531: 4390: 3577: 3201:'database_name' 3069:$ iterator->rewind() 2484:List Abstract Data Type 2109:method that returns an 1856: 1148:random access iterators 1144:bidirectional iterators 907: 602:Languages that support 5620:Bloch, Joshua (2018). 4632:is the element type). 3111:$ iterator->valid() 3075:$ iterator->valid() 2519: 2509: 2435:% Simply multiply by 2 2075:java.util.ListIterator 1125: 777:Random access iterator 743:Bidirectional iterator 661:Contrast with indexing 161:Iterators date to the 5826:Reference description 5812:PHP: Object Iteration 5372:"Iterators: Concepts" 4659:that returns itself. 3598:, list indexing with 3283:generator expressions 3141:class implements the 3105:$ iterator->next() 2517: 2502:methods for use in a 2113:. Using the enhanced 1865:JDK 1.2 release, the 1636:std::ostream_iterator 1106:C# 2.0 also supports 635:Further information: 401:higher order function 228:. By contrast with a 3162:MYSQLI_REPORT_STRICT 3145:interface as well). 3095:$ iterator->key() 2562:Standard PHP Library 1427:std::vector<T> 123:computer programming 43:improve this article 5851:Abstract data types 5822:What are iterators? 5516:C# 10 in a Nutshell 5310:"index vs iterator" 4150:'GATTACATA' 4119:'GATTACATA' 4015:/^^ <>+ $ $ / 3951:role, or both. The 3279:list comprehensions 3156:MYSQLI_REPORT_ERROR 2692:'rewinding' 2490:traversal with the 2179:class. It provides 1062:// implicit version 987:// explicit version 649:languages, such as 604:list comprehensions 405:anonymous functions 257:statement follows: 5458:on 18 October 2018 4697:loops. Below, the 4604:Specifically, the 3195:'password' 3189:'username' 2587:Knowledge\Iterator 2577:information hiding 2520: 2066:Additionally, for 1868:java.util.Iterator 1861:Introduced in the 1155:pointer arithmetic 847:Directory iterator 637:Stream (computing) 597:anonymous function 491:(later versions), 483:(later versions), 479:(later versions), 5743:"PHP 5 ChangeLog" 5667:"PHP 4 ChangeLog" 5593:978-1-098-12195-2 5525:978-1-098-12195-2 5450:Collier, Andrew. 5268:978-0-596-00712-6 5210:Watt, Stephen M. 4620:method returns a 4364:"Hello" 3986:by composing the 3325:associative array 3234:MYSQLI_USE_RESULT 3135:MYSQLI_USE_RESULT 3010:'valid: ' 2546:IteratorAggregate 2334:Furthermore, the 2249:to the file. The 2181:hasMoreElements() 1475:std::accumulate() 1140:forward iterators 1118:), but uses the " 912:Iterators in the 900: 899: 836:Constant iterator 796: 795: 467:Implicit iterator 397:internal iterator 391:Internal Iterator 251:Fibonacci numbers 185:element traversal 119: 118: 111: 93: 5858: 5754: 5753: 5751: 5750: 5739: 5733: 5732: 5730: 5729: 5718: 5712: 5711: 5709: 5708: 5697: 5691: 5684: 5678: 5677: 5675: 5674: 5663: 5657: 5656: 5654: 5653: 5642: 5636: 5635: 5617: 5598: 5597: 5579: 5564: 5563: 5545: 5530: 5529: 5511: 5496: 5495: 5490: 5489: 5474: 5468: 5467: 5465: 5463: 5454:. Archived from 5452:"Iterators in R" 5447: 5441: 5440: 5438: 5437: 5428:Kevin Waterson. 5425: 5419: 5418: 5412: 5404: 5402: 5401: 5389: 5383: 5382: 5380: 5379: 5370:Kevin Waterson. 5367: 5361: 5360: 5358: 5357: 5348:Kevin Waterson. 5345: 5339: 5338: 5332: 5324: 5318: 5317: 5305: 5299: 5298: 5296: 5295: 5285: 5279: 5278: 5276: 5275: 5260: 5249: 5240: 5239: 5233: 5225: 5220: 5219: 5207: 5201: 5200: 5194: 5186: 5180: 5179: 5168: 5159: 5158: 5153: 5152: 5140: 5134: 5133: 5128: 5127: 5121: 5112: 5103: 5102: 5096: 5095: 5083: 5062: 5053: 5032: 5029: 5026: 5023: 5020: 5017: 5014: 5011: 5008: 5005: 5002: 4999: 4996: 4993: 4990: 4987: 4984: 4981: 4978: 4975: 4972: 4969: 4966: 4963: 4960: 4957: 4953: 4950: 4947: 4944: 4941: 4938: 4935: 4932: 4929: 4926: 4923: 4920: 4917: 4914: 4911: 4908: 4905: 4902: 4899: 4896: 4893: 4890: 4887: 4884: 4881: 4878: 4875: 4872: 4869: 4866: 4863: 4860: 4857: 4854: 4851: 4848: 4845: 4842: 4838: 4835: 4832: 4828: 4825: 4822: 4819: 4816: 4813: 4810: 4807: 4804: 4801: 4798: 4795: 4792: 4789: 4786: 4783: 4780: 4777: 4774: 4771: 4768: 4765: 4762: 4759: 4756: 4753: 4750: 4746: 4743: 4740: 4737: 4734: 4731: 4728: 4725: 4722: 4719: 4716: 4713: 4710: 4707: 4700: 4696: 4692: 4688: 4681: 4677: 4673: 4669: 4665: 4658: 4654: 4650: 4646: 4642: 4638: 4631: 4627: 4623: 4619: 4615: 4611: 4607: 4600: 4597: 4594: 4591: 4588: 4585: 4582: 4579: 4576: 4573: 4570: 4567: 4564: 4561: 4558: 4551: 4547: 4543: 4539: 4527: 4523: 4516: 4513: 4510: 4507: 4504: 4501: 4498: 4495: 4492: 4489: 4483:or even shorter 4479: 4476: 4473: 4470: 4467: 4464: 4461: 4458: 4455: 4445: 4442: 4439: 4436: 4433: 4430: 4427: 4424: 4421: 4418: 4415: 4412: 4409: 4406: 4399: 4386: 4383: 4380: 4377: 4373: 4369: 4365: 4361: 4357: 4354: 4350: 4347: 4343: 4339: 4336: 4332: 4328: 4324: 4320: 4317: 4313: 4309: 4306: 4302: 4298: 4295: 4291: 4287: 4283: 4279: 4275: 4271: 4267: 4264: 4261: 4257: 4253: 4250: 4247: 4243: 4240: 4237: 4234: 4231: 4227: 4224: 4221: 4218: 4215: 4211: 4208: 4205: 4202: 4199: 4196: 4189: 4185: 4181: 4174: 4171: 4167: 4163: 4159: 4155: 4151: 4147: 4143: 4140: 4137: 4134: 4131: 4128: 4124: 4120: 4116: 4112: 4109: 4105: 4101: 4097: 4093: 4089: 4085: 4081: 4078: 4074: 4070: 4066: 4062: 4059: 4055: 4052: 4048: 4045: 4041: 4038: 4035: 4032: 4028: 4024: 4020: 4016: 4012: 4008: 4005: 4002: 3999: 3996: 3989: 3985: 3981: 3974: 3970: 3966: 3962: 3958: 3954: 3950: 3946: 3939: 3936: 3933: 3930: 3926: 3923: 3920: 3916: 3912: 3909: 3906: 3903: 3899: 3895: 3891: 3888: 3884: 3881: 3877: 3873: 3869: 3866: 3862: 3858: 3854: 3850: 3847: 3840: 3836: 3833:object, and the 3832: 3828: 3821: 3818: 3815: 3812: 3808: 3804: 3800: 3797: 3793: 3789: 3785: 3782: 3779: 3776: 3773: 3770: 3766: 3763: 3759: 3755: 3751: 3747: 3744: 3741: 3738: 3735: 3732: 3728: 3725: 3721: 3717: 3714: 3710: 3706: 3702: 3698: 3694: 3690: 3686: 3683: 3676: 3672: 3668: 3664: 3657: 3654: 3651: 3648: 3644: 3641: 3637: 3633: 3630: 3626: 3622: 3618: 3614: 3611: 3601: 3597: 3593: 3589: 3562: 3558: 3551: 3548: 3545: 3542: 3539: 3536: 3533: 3530: 3527: 3524: 3521: 3518: 3515: 3512: 3509: 3506: 3503: 3500: 3497: 3494: 3491: 3488: 3485: 3482: 3479: 3476: 3473: 3470: 3467: 3464: 3461: 3458: 3455: 3448: 3444: 3440: 3436: 3432: 3425: 3422: 3419: 3416: 3413: 3410: 3407: 3404: 3401: 3398: 3395: 3392: 3389: 3386: 3383: 3376: 3373: 3370: 3367: 3364: 3361: 3358: 3355: 3352: 3349: 3346: 3343: 3340: 3337: 3330: 3319: 3316: 3313: 3310: 3307: 3304: 3301: 3298: 3295: 3277:) statement, in 3272: 3256: 3253: 3250: 3247: 3244: 3241: 3238: 3235: 3232: 3229: 3226: 3223: 3220: 3217: 3214: 3211: 3208: 3205: 3202: 3199: 3196: 3193: 3190: 3187: 3184: 3181: 3178: 3175: 3172: 3169: 3166: 3163: 3160: 3157: 3154: 3151: 3144: 3140: 3136: 3132: 3128: 3127:IteratorIterator 3124: 3112: 3106: 3100: 3096: 3090: 3086: 3081:in this example. 3076: 3070: 3063: 3056: 3053: 3050: 3047: 3044: 3041: 3038: 3035: 3032: 3029: 3026: 3023: 3020: 3017: 3014: 3011: 3008: 3005: 3002: 2999: 2996: 2993: 2990: 2987: 2984: 2981: 2978: 2975: 2972: 2969: 2966: 2963: 2960: 2957: 2954: 2951: 2948: 2945: 2942: 2939: 2936: 2933: 2930: 2927: 2924: 2921: 2918: 2915: 2912: 2909: 2906: 2903: 2900: 2897: 2894: 2891: 2888: 2885: 2882: 2879: 2876: 2873: 2870: 2867: 2864: 2861: 2858: 2855: 2852: 2849: 2846: 2843: 2840: 2837: 2834: 2831: 2828: 2825: 2822: 2819: 2816: 2813: 2810: 2807: 2804: 2801: 2798: 2795: 2792: 2789: 2786: 2783: 2780: 2777: 2774: 2771: 2768: 2765: 2762: 2759: 2756: 2753: 2750: 2747: 2744: 2741: 2738: 2735: 2732: 2729: 2726: 2723: 2720: 2717: 2714: 2711: 2708: 2705: 2702: 2699: 2696: 2693: 2690: 2687: 2684: 2681: 2678: 2675: 2672: 2669: 2666: 2663: 2660: 2657: 2654: 2651: 2648: 2645: 2642: 2639: 2636: 2633: 2630: 2627: 2624: 2621: 2618: 2615: 2612: 2609: 2606: 2603: 2600: 2597: 2594: 2591: 2588: 2585: 2559: 2555: 2547: 2543: 2539: 2535: 2529: 2505: 2501: 2497: 2493: 2481: 2469: 2465: 2461: 2454: 2451: 2448: 2445: 2442: 2439: 2436: 2433: 2430: 2427: 2424: 2421: 2418: 2415: 2412: 2409: 2406: 2403: 2400: 2397: 2394: 2391: 2388: 2385: 2382: 2379: 2376: 2373: 2370: 2367: 2364: 2361: 2358: 2355: 2352: 2345: 2341: 2337: 2329: 2322: 2319: 2316: 2313: 2310: 2307: 2304: 2301: 2298: 2295: 2292: 2289: 2286: 2283: 2280: 2273: 2268: 2252: 2245: 2242: 2239: 2236: 2233: 2230: 2227: 2224: 2214: 2210: 2206: 2202: 2186: 2182: 2178: 2171: 2168: 2165: 2162: 2159: 2156: 2153: 2150: 2147: 2144: 2141: 2138: 2135: 2132: 2129: 2126: 2123: 2116: 2112: 2108: 2102: 2094: 2090: 2077: 2071: 2062: 2053: 2042: 2035: 2032: 2029: 2026: 2023: 2020: 2017: 2014: 2011: 2008: 2005: 2002: 1999: 1996: 1993: 1990: 1987: 1984: 1981: 1978: 1975: 1972: 1969: 1966: 1963: 1960: 1957: 1954: 1951: 1948: 1945: 1942: 1939: 1936: 1933: 1930: 1927: 1924: 1921: 1918: 1911: 1907: 1903: 1896: 1892: 1886: 1880: 1874: 1870: 1852: 1849: 1846: 1843: 1840: 1837: 1834: 1831: 1828: 1825: 1822: 1819: 1816: 1813: 1810: 1807: 1804: 1801: 1798: 1795: 1792: 1789: 1786: 1783: 1780: 1777: 1774: 1771: 1768: 1765: 1762: 1759: 1756: 1753: 1750: 1747: 1744: 1741: 1723: 1720: 1717: 1714: 1711: 1708: 1705: 1702: 1699: 1696: 1693: 1690: 1687: 1686:ostream_iterator 1684: 1681: 1678: 1675: 1672: 1669: 1666: 1663: 1660: 1657: 1654: 1651: 1648: 1645: 1638: 1632: 1625: 1622: 1619: 1616: 1613: 1610: 1607: 1604: 1601: 1598: 1595: 1592: 1589: 1586: 1583: 1580: 1577: 1574: 1571: 1568: 1565: 1562: 1559: 1556: 1553: 1550: 1547: 1544: 1541: 1538: 1535: 1532: 1529: 1526: 1523: 1520: 1517: 1514: 1511: 1508: 1505: 1502: 1499: 1492: 1488: 1484: 1477: 1471: 1465: 1455: 1451: 1447: 1440: 1436: 1432: 1428: 1420: 1417: 1414: 1411: 1408: 1405: 1402: 1399: 1396: 1393: 1390: 1387: 1384: 1381: 1378: 1375: 1372: 1369: 1366: 1363: 1360: 1357: 1354: 1351: 1348: 1345: 1342: 1339: 1336: 1333: 1330: 1327: 1324: 1321: 1318: 1315: 1312: 1309: 1306: 1303: 1300: 1297: 1294: 1291: 1288: 1285: 1282: 1279: 1276: 1273: 1270: 1267: 1264: 1261: 1258: 1255: 1252: 1249: 1246: 1243: 1240: 1237: 1234: 1231: 1228: 1225: 1222: 1219: 1216: 1213: 1210: 1207: 1204: 1201: 1198: 1195: 1185: 1181: 1176: 1168: 1164: 1160: 1136:Standard Library 1121: 1117: 1113: 1102: 1099: 1096: 1093: 1090: 1087: 1084: 1081: 1078: 1075: 1072: 1069: 1066: 1063: 1060: 1057: 1054: 1051: 1048: 1045: 1042: 1039: 1036: 1033: 1030: 1027: 1024: 1021: 1018: 1015: 1012: 1009: 1006: 1003: 1000: 997: 994: 991: 988: 966: 954: 950: 946: 939: 935: 931: 927: 923: 919: 828:Caching iterator 806: 805: 785:Trivial iterator 753:Forward iterator 732: 731: 626: 615: 612: 590: 587: 584: 581: 578: 575: 572: 569: 566: 563: 553: 550: 547: 544: 541: 538: 535: 532: 529: 519: 462: 459: 456: 453: 450: 447: 444: 441: 438: 435: 432: 429: 426: 423: 420: 417: 410: 386: 383: 380: 377: 374: 371: 368: 365: 362: 359: 356: 353: 350: 347: 344: 341: 338: 335: 332: 329: 326: 323: 320: 317: 314: 311: 308: 305: 302: 299: 296: 293: 290: 287: 284: 281: 278: 275: 272: 269: 266: 263: 256: 175:Iterator pattern 114: 107: 103: 100: 94: 92: 51: 27: 19: 5866: 5865: 5861: 5860: 5859: 5857: 5856: 5855: 5831: 5830: 5792:Stephen M. Watt 5763: 5758: 5757: 5748: 5746: 5741: 5740: 5736: 5727: 5725: 5724:. The PHP Group 5720: 5719: 5715: 5706: 5704: 5703:. The PHP Group 5699: 5698: 5694: 5685: 5681: 5672: 5670: 5665: 5664: 5660: 5651: 5649: 5644: 5643: 5639: 5632: 5618: 5601: 5594: 5582:Price, Mark J. 5580: 5567: 5560: 5546: 5533: 5526: 5512: 5499: 5487: 5485: 5476: 5475: 5471: 5461: 5459: 5448: 5444: 5435: 5433: 5426: 5422: 5406: 5405: 5399: 5397: 5390: 5386: 5377: 5375: 5368: 5364: 5355: 5353: 5346: 5342: 5326: 5325: 5315: 5313: 5306: 5302: 5293: 5291: 5287: 5286: 5282: 5273: 5271: 5269: 5258: 5250: 5243: 5227: 5226: 5217: 5215: 5208: 5204: 5188: 5187: 5177: 5175: 5170: 5169: 5162: 5150: 5148: 5145:"STL Iterators" 5141: 5137: 5125: 5123: 5119: 5113: 5106: 5093: 5091: 5084: 5080: 5075: 5066:Visitor pattern 5060: 5051: 5039: 5034: 5033: 5030: 5027: 5024: 5022:"{n}" 5021: 5018: 5015: 5012: 5009: 5006: 5003: 5000: 4997: 4994: 4991: 4988: 4985: 4982: 4979: 4976: 4973: 4970: 4967: 4964: 4961: 4958: 4955: 4951: 4948: 4945: 4942: 4939: 4936: 4933: 4930: 4927: 4924: 4921: 4918: 4915: 4912: 4909: 4906: 4903: 4900: 4897: 4894: 4891: 4888: 4885: 4882: 4879: 4876: 4873: 4870: 4867: 4864: 4861: 4858: 4855: 4852: 4849: 4846: 4843: 4840: 4836: 4833: 4830: 4826: 4823: 4820: 4817: 4814: 4811: 4808: 4805: 4802: 4799: 4796: 4793: 4790: 4787: 4784: 4781: 4778: 4775: 4772: 4769: 4766: 4763: 4760: 4757: 4754: 4751: 4748: 4744: 4741: 4738: 4735: 4732: 4729: 4726: 4723: 4720: 4717: 4714: 4711: 4708: 4705: 4698: 4694: 4690: 4686: 4679: 4675: 4671: 4667: 4663: 4656: 4652: 4648: 4644: 4640: 4636: 4629: 4625: 4621: 4617: 4613: 4609: 4605: 4602: 4601: 4598: 4595: 4592: 4589: 4586: 4583: 4580: 4577: 4574: 4571: 4568: 4565: 4562: 4559: 4556: 4549: 4545: 4541: 4537: 4534: 4525: 4521: 4518: 4517: 4514: 4511: 4508: 4505: 4502: 4499: 4496: 4493: 4490: 4487: 4481: 4480: 4477: 4474: 4471: 4468: 4465: 4462: 4459: 4456: 4453: 4447: 4446: 4443: 4440: 4437: 4434: 4431: 4428: 4425: 4422: 4419: 4416: 4413: 4410: 4407: 4404: 4397: 4393: 4388: 4387: 4384: 4381: 4378: 4375: 4371: 4367: 4363: 4359: 4355: 4352: 4348: 4345: 4341: 4337: 4334: 4330: 4326: 4322: 4318: 4315: 4311: 4307: 4304: 4300: 4296: 4293: 4289: 4285: 4281: 4277: 4273: 4269: 4265: 4262: 4259: 4255: 4251: 4248: 4245: 4241: 4238: 4235: 4232: 4229: 4225: 4222: 4219: 4216: 4213: 4209: 4206: 4203: 4200: 4197: 4194: 4187: 4183: 4179: 4176: 4175: 4172: 4169: 4165: 4161: 4157: 4153: 4149: 4145: 4141: 4138: 4135: 4132: 4129: 4126: 4122: 4118: 4114: 4110: 4107: 4103: 4099: 4095: 4091: 4087: 4083: 4079: 4076: 4072: 4068: 4064: 4060: 4057: 4053: 4050: 4046: 4043: 4039: 4036: 4033: 4030: 4026: 4022: 4018: 4014: 4010: 4006: 4003: 4000: 3997: 3994: 3987: 3983: 3979: 3972: 3968: 3964: 3960: 3956: 3952: 3948: 3944: 3941: 3940: 3937: 3934: 3931: 3928: 3924: 3921: 3918: 3914: 3910: 3907: 3904: 3901: 3897: 3893: 3889: 3886: 3882: 3879: 3875: 3871: 3867: 3864: 3860: 3856: 3852: 3848: 3845: 3838: 3834: 3830: 3826: 3823: 3822: 3819: 3816: 3814:# three => 3 3813: 3810: 3806: 3803:%word-to-number 3802: 3798: 3795: 3791: 3787: 3784:%word-to-number 3783: 3780: 3777: 3774: 3771: 3768: 3764: 3761: 3757: 3753: 3749: 3746:%word-to-number 3745: 3742: 3739: 3736: 3734:# three => 3 3733: 3730: 3726: 3723: 3719: 3716:%word-to-number 3715: 3712: 3708: 3705:'three' 3704: 3700: 3696: 3692: 3688: 3685:%word-to-number 3684: 3681: 3674: 3670: 3666: 3662: 3659: 3658: 3655: 3652: 3649: 3646: 3642: 3639: 3635: 3631: 3628: 3624: 3620: 3616: 3612: 3609: 3599: 3595: 3591: 3587: 3580: 3560: 3556: 3553: 3552: 3549: 3546: 3543: 3540: 3537: 3534: 3531: 3528: 3526:# in Python 3.x 3525: 3522: 3519: 3516: 3513: 3510: 3507: 3505:# in Python 2.x 3504: 3501: 3498: 3495: 3492: 3489: 3486: 3483: 3480: 3477: 3474: 3471: 3468: 3465: 3462: 3459: 3456: 3453: 3446: 3442: 3438: 3434: 3430: 3427: 3426: 3423: 3420: 3417: 3414: 3411: 3408: 3405: 3402: 3399: 3396: 3393: 3390: 3387: 3384: 3381: 3378: 3377: 3374: 3371: 3368: 3365: 3362: 3359: 3356: 3353: 3350: 3347: 3344: 3341: 3338: 3335: 3328: 3321: 3320: 3317: 3314: 3311: 3308: 3305: 3302: 3299: 3296: 3293: 3270: 3263: 3258: 3257: 3254: 3251: 3248: 3245: 3242: 3239: 3236: 3233: 3230: 3227: 3224: 3221: 3218: 3215: 3212: 3209: 3206: 3203: 3200: 3197: 3194: 3191: 3188: 3185: 3182: 3179: 3176: 3173: 3170: 3167: 3164: 3161: 3158: 3155: 3152: 3149: 3142: 3138: 3134: 3130: 3126: 3122: 3110: 3104: 3098: 3094: 3088: 3084: 3074: 3068: 3061: 3058: 3057: 3054: 3051: 3048: 3045: 3042: 3039: 3036: 3033: 3031:'false' 3030: 3027: 3024: 3021: 3018: 3015: 3012: 3009: 3006: 3003: 3000: 2997: 2994: 2991: 2988: 2985: 2982: 2979: 2976: 2973: 2970: 2967: 2964: 2961: 2958: 2955: 2952: 2949: 2946: 2943: 2940: 2937: 2934: 2931: 2928: 2925: 2922: 2919: 2916: 2913: 2910: 2907: 2904: 2901: 2898: 2895: 2892: 2889: 2886: 2883: 2880: 2877: 2874: 2871: 2868: 2865: 2862: 2859: 2856: 2853: 2850: 2847: 2844: 2841: 2838: 2835: 2832: 2829: 2826: 2823: 2820: 2817: 2814: 2811: 2808: 2805: 2802: 2799: 2796: 2793: 2790: 2787: 2784: 2781: 2778: 2775: 2772: 2769: 2767:"current: 2766: 2763: 2760: 2757: 2754: 2751: 2748: 2745: 2742: 2739: 2736: 2733: 2730: 2727: 2724: 2721: 2718: 2715: 2712: 2709: 2706: 2703: 2700: 2697: 2694: 2691: 2688: 2685: 2682: 2679: 2676: 2673: 2670: 2667: 2664: 2661: 2658: 2655: 2652: 2649: 2646: 2643: 2640: 2637: 2634: 2631: 2628: 2625: 2622: 2619: 2616: 2613: 2610: 2607: 2604: 2601: 2598: 2595: 2592: 2589: 2586: 2583: 2557: 2553: 2545: 2541: 2537: 2533: 2527: 2512: 2503: 2499: 2495: 2491: 2479: 2467: 2463: 2459: 2456: 2455: 2452: 2449: 2446: 2443: 2440: 2437: 2434: 2431: 2428: 2425: 2422: 2419: 2416: 2413: 2410: 2407: 2404: 2401: 2398: 2395: 2392: 2389: 2386: 2383: 2380: 2377: 2374: 2371: 2368: 2365: 2362: 2359: 2356: 2353: 2350: 2343: 2339: 2335: 2327: 2324: 2323: 2320: 2317: 2314: 2311: 2308: 2305: 2302: 2299: 2296: 2293: 2290: 2287: 2284: 2281: 2278: 2271: 2266: 2260: 2251:JavaConversions 2250: 2247: 2246: 2243: 2240: 2238:JavaConversions 2237: 2234: 2231: 2228: 2225: 2222: 2212: 2208: 2204: 2200: 2193: 2184: 2180: 2176: 2173: 2172: 2169: 2166: 2163: 2160: 2157: 2154: 2151: 2148: 2145: 2142: 2139: 2136: 2133: 2130: 2127: 2124: 2121: 2114: 2110: 2104: 2100: 2092: 2086: 2073: 2067: 2060: 2051: 2040: 2037: 2036: 2033: 2030: 2027: 2024: 2021: 2018: 2015: 2012: 2009: 2006: 2003: 2000: 1997: 1994: 1991: 1988: 1985: 1982: 1979: 1976: 1973: 1970: 1967: 1964: 1961: 1958: 1955: 1952: 1949: 1946: 1943: 1940: 1937: 1934: 1931: 1928: 1925: 1922: 1919: 1916: 1909: 1905: 1901: 1894: 1888: 1882: 1876: 1872: 1866: 1859: 1854: 1853: 1850: 1847: 1844: 1841: 1838: 1835: 1832: 1829: 1826: 1823: 1820: 1817: 1814: 1811: 1808: 1805: 1802: 1799: 1796: 1793: 1790: 1787: 1784: 1781: 1778: 1775: 1772: 1769: 1766: 1763: 1760: 1757: 1754: 1751: 1748: 1745: 1742: 1739: 1733:lambda function 1725: 1724: 1721: 1718: 1715: 1712: 1709: 1706: 1703: 1700: 1697: 1694: 1691: 1688: 1685: 1682: 1679: 1676: 1673: 1670: 1667: 1664: 1661: 1658: 1655: 1652: 1649: 1646: 1643: 1634: 1630: 1627: 1626: 1623: 1620: 1617: 1614: 1611: 1608: 1605: 1602: 1599: 1596: 1593: 1590: 1587: 1584: 1581: 1578: 1575: 1572: 1569: 1566: 1563: 1560: 1557: 1554: 1551: 1548: 1545: 1542: 1539: 1536: 1533: 1530: 1527: 1524: 1521: 1518: 1515: 1512: 1509: 1506: 1503: 1500: 1497: 1490: 1486: 1482: 1473: 1467: 1463:std::for_each() 1461: 1453: 1449: 1445: 1438: 1434: 1430: 1426: 1422: 1421: 1418: 1415: 1412: 1409: 1406: 1403: 1400: 1397: 1394: 1391: 1388: 1385: 1382: 1379: 1376: 1373: 1370: 1367: 1364: 1361: 1358: 1355: 1352: 1349: 1346: 1343: 1340: 1337: 1334: 1331: 1328: 1325: 1322: 1319: 1316: 1313: 1310: 1307: 1304: 1301: 1298: 1295: 1292: 1289: 1286: 1283: 1280: 1277: 1274: 1271: 1268: 1265: 1262: 1259: 1256: 1253: 1250: 1247: 1244: 1241: 1238: 1235: 1232: 1229: 1226: 1223: 1220: 1217: 1214: 1211: 1208: 1205: 1202: 1199: 1196: 1193: 1183: 1179: 1174: 1166: 1162: 1158: 1128: 1119: 1115: 1111: 1104: 1103: 1100: 1097: 1094: 1091: 1088: 1085: 1082: 1079: 1076: 1073: 1070: 1067: 1064: 1061: 1058: 1055: 1052: 1049: 1046: 1043: 1040: 1037: 1034: 1031: 1028: 1025: 1022: 1019: 1016: 1013: 1010: 1007: 1004: 1001: 998: 995: 992: 989: 986: 964: 952: 948: 945:GetEnumerator() 944: 937: 933: 929: 925: 921: 917: 910: 905: 858:Filter iterator 801: 769:Output iterator 727: 722: 701:object-oriented 663: 639: 633: 624: 617: 616: 613: 610: 592: 591: 588: 585: 582: 579: 576: 573: 570: 567: 564: 561: 555: 554: 551: 548: 545: 542: 539: 536: 533: 530: 527: 515: 469: 464: 463: 460: 457: 454: 451: 448: 445: 442: 439: 436: 433: 430: 427: 424: 421: 418: 415: 408: 393: 388: 387: 384: 381: 378: 375: 372: 369: 366: 363: 360: 357: 354: 351: 348: 345: 342: 339: 336: 333: 330: 327: 324: 321: 318: 315: 312: 309: 306: 303: 300: 297: 294: 291: 288: 285: 282: 279: 276: 273: 270: 267: 264: 261: 254: 253:using Python's 239:tree traversers 218: 212: 177: 171: 156:database cursor 115: 104: 98: 95: 52: 50: 40: 28: 17: 12: 11: 5: 5864: 5854: 5853: 5848: 5843: 5829: 5828: 5819: 5814: 5809: 5807:Java interface 5804: 5799: 5794: 5790:" (217 KB) by 5784: 5782:Joshua Gatcomb 5774: 5772:.NET interface 5769: 5762: 5761:External links 5759: 5756: 5755: 5734: 5713: 5692: 5679: 5658: 5637: 5631:978-0134685991 5630: 5599: 5592: 5565: 5559:978-1617294532 5558: 5531: 5524: 5497: 5469: 5442: 5420: 5384: 5362: 5340: 5300: 5280: 5267: 5241: 5202: 5160: 5135: 5104: 5077: 5076: 5074: 5071: 5070: 5069: 5063: 5054: 5045: 5038: 5035: 4704: 4584:"{}" 4555: 4533: 4530: 4486: 4452: 4403: 4392: 4389: 4344:{ 4333:; 4325:{ 4193: 3993: 3844: 3680: 3608: 3579: 3576: 3452: 3380: 3334: 3292: 3262: 3259: 3148: 3119: 3118: 3108: 3102: 3092: 3082: 3072: 3025:'true' 2582: 2511: 2508: 2349: 2277: 2259: 2256: 2221: 2192: 2189: 2120: 2069:java.util.List 2028:", " 1915: 1858: 1855: 1738: 1642: 1496: 1446:const_iterator 1439:const_iterator 1192: 1127: 1124: 985: 914:.NET Framework 909: 906: 904: 901: 898: 897: 894: 890: 889: 886: 882: 881: 875: 871: 870: 867: 866:Limit iterator 863: 862: 859: 855: 854: 848: 844: 843: 837: 833: 832: 829: 825: 824: 818: 817:Array iterator 814: 813: 810: 800: 797: 794: 793: 786: 782: 781: 778: 774: 773: 770: 766: 765: 762: 761:Input iterator 758: 757: 754: 750: 749: 744: 740: 739: 736: 726: 723: 721: 720:Classification 718: 697: 696: 692: 689: 686: 662: 659: 632: 629: 609: 560: 526: 468: 465: 422:squared_digits 414: 403:(often taking 392: 389: 260: 214:Main article: 211: 208: 181:element access 173:Main article: 170: 167: 117: 116: 31: 29: 22: 15: 9: 6: 4: 3: 2: 5863: 5852: 5849: 5847: 5844: 5842: 5839: 5838: 5836: 5827: 5823: 5820: 5818: 5817:STL Iterators 5815: 5813: 5810: 5808: 5805: 5803: 5800: 5798: 5795: 5793: 5789: 5785: 5783: 5779: 5775: 5773: 5770: 5768: 5765: 5764: 5744: 5738: 5723: 5717: 5702: 5696: 5689: 5683: 5668: 5662: 5647: 5641: 5633: 5627: 5623: 5616: 5614: 5612: 5610: 5608: 5606: 5604: 5595: 5589: 5585: 5578: 5576: 5574: 5572: 5570: 5561: 5555: 5551: 5544: 5542: 5540: 5538: 5536: 5527: 5521: 5517: 5510: 5508: 5506: 5504: 5502: 5494: 5484:on 2015-05-01 5483: 5479: 5473: 5457: 5453: 5446: 5431: 5424: 5416: 5410: 5395: 5388: 5373: 5366: 5351: 5344: 5336: 5330: 5323: 5311: 5304: 5290: 5284: 5270: 5264: 5257: 5256: 5248: 5246: 5237: 5231: 5224: 5213: 5206: 5198: 5192: 5185: 5173: 5167: 5165: 5157: 5146: 5143:Alex Allain. 5139: 5132: 5118: 5111: 5109: 5101: 5089: 5082: 5078: 5067: 5064: 5058: 5055: 5049: 5046: 5044: 5041: 5040: 4702: 4683: 4660: 4633: 4628:value, where 4553: 4529: 4484: 4450: 4401: 4191: 4173:# GAT-TAC-ATA 3991: 3976: 3842: 3820:# two => 2 3817:# one => 1 3740:# two => 2 3737:# one => 1 3697:'two' 3689:'one' 3678: 3665:objects. The 3606: 3603: 3585: 3582:Iterators in 3575: 3573: 3569: 3564: 3532:StopIteration 3450: 3447:StopIteration 3332: 3326: 3290: 3288: 3284: 3280: 3276: 3268: 3265:Iterators in 3150:mysqli_report 3146: 3116: 3109: 3103: 3093: 3083: 3080: 3073: 3067: 3066: 3065: 2599:ArrayIterator 2580: 2578: 2574: 2569: 2567: 2563: 2551: 2531: 2524: 2516: 2507: 2489: 2485: 2477: 2471: 2347: 2331: 2275: 2264: 2255: 2219: 2216: 2198: 2188: 2185:nextElement() 2118: 2107: 2098: 2089: 2084: 2079: 2076: 2070: 2064: 2058: 2048: 2044: 2039:To show that 1913: 1898: 1891: 1885: 1879: 1869: 1864: 1740:ContainerType 1736: 1734: 1730: 1640: 1637: 1498:ContainerType 1494: 1479: 1476: 1470: 1464: 1458: 1442: 1190: 1187: 1170: 1156: 1153: 1149: 1145: 1141: 1137: 1133: 1123: 1109: 1014:GetEnumerator 983: 980: 978: 974: 970: 962: 959:statement in 958: 951:interface. a 941: 915: 895: 892: 891: 887: 884: 883: 879: 876: 874:List iterator 873: 872: 868: 865: 864: 860: 857: 856: 853: 849: 846: 845: 841: 838: 835: 834: 830: 827: 826: 822: 819: 816: 815: 811: 808: 807: 804: 791: 787: 784: 783: 779: 776: 775: 771: 768: 767: 763: 760: 759: 755: 752: 751: 748: 745: 742: 741: 737: 734: 733: 730: 717: 713: 709: 705: 702: 693: 690: 687: 684: 680: 676: 675:random access 672: 671: 670: 668: 658: 656: 652: 648: 644: 643:input streams 638: 628: 622: 607: 605: 600: 598: 558: 524: 521: 518: 512: 510: 506: 502: 498: 494: 490: 486: 482: 478: 474: 412: 406: 402: 398: 258: 252: 248: 244: 240: 235: 231: 227: 224:, known as a 223: 217: 207: 205: 201: 196: 192: 188: 186: 182: 176: 166: 164: 159: 157: 152: 150: 145: 143: 138: 137:, in order. 136: 132: 128: 124: 113: 110: 102: 91: 88: 84: 81: 77: 74: 70: 67: 63: 60: β€“  59: 55: 54:Find sources: 48: 44: 38: 37: 32:This article 30: 26: 21: 20: 5747:. Retrieved 5737: 5726:. Retrieved 5716: 5705:. Retrieved 5695: 5682: 5671:. Retrieved 5661: 5650:. Retrieved 5640: 5621: 5583: 5549: 5518:. O'Reilly. 5515: 5492: 5486:. Retrieved 5482:the original 5472: 5460:. Retrieved 5456:the original 5445: 5434:. Retrieved 5423: 5398:. Retrieved 5387: 5376:. Retrieved 5365: 5354:. Retrieved 5343: 5320: 5314:. Retrieved 5303: 5292:. Retrieved 5283: 5272:. Retrieved 5254: 5222: 5216:. Retrieved 5205: 5182: 5176:. Retrieved 5155: 5149:. Retrieved 5138: 5130: 5124:. Retrieved 5098: 5092:. Retrieved 5081: 4691:IntoIterator 4684: 4661: 4657:IntoIterator 4637:IntoIterator 4634: 4603: 4535: 4519: 4482: 4448: 4394: 4349:IterationEnd 4314:){ 4292:; } 4276:) { 4177: 4063:) { 3977: 3942: 3915:IterationEnd 3839:IterationEnd 3824: 3660: 3604: 3581: 3565: 3554: 3428: 3322: 3264: 3139:PDOStatement 3120: 3114: 3078: 3059: 2923:"next: 2573:type hinting 2570: 2521: 2472: 2457: 2332: 2325: 2261: 2248: 2217: 2194: 2174: 2103:defines the 2080: 2065: 2049: 2045: 2038: 1899: 1860: 1726: 1633:, passing a 1628: 1480: 1459: 1443: 1423: 1188: 1171: 1157:, where the 1147: 1143: 1139: 1129: 1120:yield return 1105: 981: 975:versions in 942: 911: 893:XML iterator 802: 728: 714: 710: 706: 698: 667:loop counter 664: 640: 618: 601: 593: 556: 522: 513: 470: 396: 394: 233: 219: 204:loop counter 200:loop counter 197: 193: 189: 184: 180: 178: 160: 153: 146: 139: 126: 120: 105: 96: 86: 79: 72: 65: 53: 41:Please help 36:verification 33: 5722:"Iterators" 5552:. Manning. 5550:C# in Depth 5462:16 November 5432:. PHPRO.ORG 5259:(paperback) 4641:into_iter() 4610:into_iter() 4166:'-' 3878:; 3590:statement, 3143:Traversable 3123:Traversable 2845:"key: 2629:__construct 2568:since 5.5. 2558:Traversable 2554:getIterator 2534:Traversable 2464:myCustomFun 2423:myCustomFun 2390:myCustomFun 2177:Enumeration 2072:there is a 1875:provides a 1618:ProcessItem 1522:ProcessItem 1469:std::copy() 1116:IEnumerable 1112:IEnumerator 990:IEnumerator 969:duck typing 965:IEnumerable 949:IEnumerable 924:provides a 922:IEnumerator 918:IEnumerator 647:data-driven 507:provide an 247:constructor 5835:Categories 5749:2015-10-13 5728:2015-10-13 5707:2015-10-13 5673:2015-10-13 5652:2012-08-08 5488:2012-08-09 5436:2012-08-09 5400:2012-08-09 5378:2012-08-09 5356:2012-08-09 5316:2012-08-08 5294:2020-07-15 5274:2012-08-09 5218:2012-08-08 5178:2012-08-08 5151:2012-08-08 5126:2012-08-08 5094:2012-08-08 5090:. Perl.com 5073:References 4522:Enumerator 4449:...and... 4351:} } } 4340:} 3772:# three: 3 3568:generators 3561:__next__() 3557:__iter__() 3439:__next__() 3397:dictionary 3357:dictionary 3345:dictionary 3287:collection 2566:Generators 2411:myNewArray 2372:myNewArray 2232:collection 2106:iterator() 1895:iterator() 1431:*<T> 1108:generators 938:MoveNext() 926:MoveNext() 920:interface. 812:Languages 738:Languages 725:Categories 625:for_each() 230:subroutine 135:collection 69:newspapers 58:"Iterator" 5797:Iterators 5786:Article " 5776:Article " 5586:. Packt. 4952:Fibonacci 4788:Fibonacci 4730:Fibonacci 4709:Fibonacci 4699:Fibonacci 4376:# OUTPUT: 4370:) { . 4170:# OUTPUT: 4136:# (A T A) 4133:# (T A C) 4130:# (G A T) 4127:# OUTPUT: 4121:) { . 4025: %% 3975:methods. 3929:# OUTPUT: 3892: := 3870: := 3811:# OUTPUT: 3769:# OUTPUT: 3731:# OUTPUT: 3647:# OUTPUT: 3566:Python's 3281:, and in 2605:\Iterator 2584:namespace 2540:loop are 2492:hasNext() 2460:simpleFun 2438:outScalar 2417:outScalar 2354:simpleFun 2330:keyword. 2061:hasNext() 2041:hasNext() 1910:hasNext() 1884:hasNext() 1631:std::copy 1266:push_back 1245:push_back 1224:push_back 1092:WriteLine 1044:WriteLine 788:C++ (old 509:intrinsic 361:fibonacci 265:fibonacci 226:generator 222:coroutine 210:Generator 142:interface 99:June 2010 5648:. Oracle 5409:cite web 5329:cite web 5230:cite web 5191:cite web 5043:Iteratee 5037:See also 5016:println! 4782:Iterator 4687:Iterator 4680:Iterator 4668:filter() 4653:Iterator 4645:Iterator 4578:println! 4356:Repeater 4327:$ !count 4323:$ !times 4319:$ !count 4310:(--> 4308:pull-one 4297:iterator 4288:, : 4252:$ !count 4242:required 4236:$ .times 4226:required 4210:Iterator 4204:Iterable 4198:Repeater 4188:Iterator 4184:Iterable 4180:Repeater 4104:iterator 4088:$ .chain 4080:iterator 4058:Strand:D 4047:$ .chain 4040:Iterable 3988:Iterable 3984:iterator 3973:pull-one 3969:iterator 3965:pull-one 3961:Iterator 3957:iterator 3953:Iterable 3949:Iterator 3945:Iterable 3900:; 3898:pull-one 3876:iterator 3835:pull-one 3831:Iterator 3827:iterator 3778:# two: 2 3775:# one: 1 3572:protocol 3466:sequence 3303:sequence 3216:$ mysqli 3168:$ mysqli 3113:returns 3077:returns 2962:function 2884:function 2806:function 2728:function 2671:function 2626:function 2552:method ( 2550:accessor 2542:Iterator 2468:arrayfun 2450:inScalar 2429:inScalar 2414:function 2378:arrayfun 2351:function 2336:arrayfun 2111:Iterator 2101:Iterable 2088:Iterable 2052:remove() 1932:iterator 1917:Iterator 1890:remove() 1873:Iterator 1836:<< 1830:<< 1806:ItemType 1770:for_each 1746:ItemType 1692:ItemType 1588:for_each 1564:<< 1558:<< 1531:ItemType 1504:ItemType 1491:for_each 1404:<< 1350:<< 1032:MoveNext 977:.NET 2.0 735:Category 562:iterable 537:iterable 127:iterator 5690:source. 4989:step_by 4682:trait. 4626:Some(T) 4385:# Hello 4382:# Hello 4379:# Hello 4338:$ !item 4290:$ times 4284: : 4274:$ times 4220:$ .item 4190:roles: 4073:$ chain 4071: : 4061:$ chain 3971:and/or 3925:$ value 3911:$ value 3890:$ value 3872:@values 3849:@values 3758:$ value 3643:$ value 3636:$ value 3632:@values 3613:@values 3602:, etc. 3329:items() 3275:foreach 3210:foreach 3177:\mysqli 3131:foreach 3089:$ value 3046:$ valid 3037:PHP_EOL 3019:$ valid 2992:current 2980:$ valid 2950:$ value 2941:PHP_EOL 2929:$ value 2896:$ value 2863:PHP_EOL 2794:$ value 2785:PHP_EOL 2773:$ value 2746:current 2740:$ value 2731:current 2698:PHP_EOL 2659:$ array 2638:$ array 2617:$ array 2611:private 2602:extends 2538:foreach 2528:foreach 2506:-loop. 2500:reset() 2402:myArray 2360:myArray 2340:cellfun 2300:myArray 2282:myArray 2209:collect 2097:foreach 2004:hasNext 1953:hasNext 1180:begin() 1086:Console 1065:foreach 1056:Current 1038:Console 973:generic 957:foreach 953:Current 934:Reset() 930:Current 861:PHP, R 677:, like 517:foreach 169:Pattern 149:coupled 83:scholar 5628:  5590:  5556:  5522:  5265:  5100:value. 4831:Option 4829:-> 4747:-> 4706:struct 4676:take() 4672:skip() 4649:next() 4618:next() 4552:type: 4542:next() 4346:return 4335:return 4321:<= 4305:method 4303:} 4294:method 4286:$ item 4282:bless: 4270:$ item 4263:method 4258:; 4244:; 4228:; 4212:{ 4084:DNA:D: 4077:method 4075:} 4069:bless: 4051:method 4049:; 4042:{ 3998:Strand 3995:subset 3947:role, 3885:{ 3794:{ 3790:-> 3760:{ 3752:-> 3727:$ pair 3722:{ 3720:$ pair 3718:-> 3707:=> 3699:=> 3691:=> 3675:values 3638:{ 3634:-> 3529:except 3443:next() 3435:next() 3431:iter() 3267:Python 3261:Python 3043:return 2986:$ this 2959:public 2947:return 2935:" 2908:$ this 2881:public 2869:return 2857:" 2830:$ this 2803:public 2791:return 2779:" 2752:$ this 2725:public 2710:$ this 2674:rewind 2668:public 2647:$ this 2623:public 2560:. The 2496:next() 2263:MATLAB 2258:MATLAB 2223:import 2213:filter 2146:System 2128:MyType 2057:thread 2010:System 1962:System 1906:next() 1902:next() 1878:next() 1727:Since 1719:" 1713:" 1450:insert 1200:vector 1146:, and 1071:MyType 996:MyType 852:Python 842:, PHP 631:Stream 501:Python 481:Delphi 455:digits 434:lambda 416:digits 382:number 355:number 243:Python 131:object 129:is an 85:  78:  71:  64:  56:  5780:" by 5374:. sgi 5120:(PDF) 4818:& 4664:map() 4550:Range 4526:#next 4494:times 4260:multi 4195:class 4106:} }; 4096:rotor 4031:class 4023:chars 4011:match 4007:where 3809:}; } 3807:$ key 3792:$ key 3754:$ key 3547:value 3541:print 3538:break 3508:value 3487:value 3472:while 3421:value 3409:print 3403:items 3391:value 3372:value 3360:print 3351:value 3315:value 3309:print 3297:value 3243:$ row 3222:query 3219:-> 3115:false 3099:$ key 3001:false 2989:-> 2965:valid 2914:array 2911:-> 2872:$ key 2851:$ key 2836:array 2833:-> 2818:$ key 2758:array 2755:-> 2716:array 2713:-> 2704:reset 2653:array 2650:-> 2635:array 2614:array 2596:class 2593:final 2504:while 2226:scala 2197:Scala 2191:Scala 2158:print 2022:print 1974:print 1941:while 1809:& 1803:const 1782:begin 1729:C++11 1662:begin 1600:begin 1534:& 1528:const 1483:begin 1454:erase 1386:items 1314:items 1302:begin 1296:items 1260:items 1239:items 1218:items 1212:items 1184:end() 1163:-> 1098:value 1074:value 1020:while 850:PHP, 799:Types 683:trees 679:lists 611:names 586:value 577:value 549:value 543:print 531:value 399:is a 376:print 319:yield 313:limit 307:range 271:limit 255:yield 234:yield 125:, an 90:JSTOR 76:books 5626:ISBN 5588:ISBN 5554:ISBN 5520:ISBN 5464:2013 5415:link 5335:link 5263:ISBN 5236:link 5197:link 5001:take 4977:skip 4931:next 4925:Some 4919:next 4907:self 4895:self 4883:self 4871:self 4859:self 4853:next 4844:> 4841:Item 4837:Self 4834:< 4824:self 4812:next 4797:Item 4794:type 4779:impl 4755:Self 4749:Self 4727:impl 4622:None 4532:Rust 4509:puts 4472:puts 4438:puts 4423:each 4398:each 4391:Ruby 4342:else 4301:self 4278:self 4207:does 4201:does 4186:and 4178:The 4162:join 4158:join 4092:comb 4065:self 4037:does 3978:The 3927:; } 3913:=:= 3905:last 3894:$ it 3883:loop 3868:$ it 3788:keys 3729:; } 3671:keys 3663:Pair 3596:grep 3584:Raku 3578:Raku 3514:next 3499:next 3475:True 3460:iter 3079:true 3007:echo 2974:bool 2920:echo 2902:next 2887:next 2842:echo 2764:echo 2689:echo 2683:void 2575:and 2544:and 2530:loop 2498:and 2488:List 2480:cell 2344:cell 2338:and 2306:disp 2267:cell 2183:and 2137:list 2083:J2SE 2081:The 1998:iter 1989:()); 1986:next 1980:iter 1947:iter 1926:list 1920:iter 1900:The 1881:and 1863:Java 1857:Java 1845:endl 1827:cout 1749:> 1743:< 1707:cout 1695:> 1689:< 1650:copy 1573:endl 1555:cout 1519:void 1507:> 1501:< 1485:and 1472:and 1401:cout 1377:auto 1347:cout 1287:auto 1209:> 1203:< 1161:and 1130:The 1114:(or 1080:list 1050:iter 1026:iter 1008:list 1002:iter 999:> 993:< 908:.NET 896:PHP 888:PHP 880:, R 878:Java 869:PHP 831:PHP 823:, R 809:Type 780:C++ 772:C++ 764:C++ 756:C++ 653:and 583:puts 568:each 505:Ruby 497:Perl 489:Java 62:news 4971:fib 4962:for 4959:(); 4956:new 4946:fib 4943:let 4850:let 4821:mut 4803:u64 4785:for 4742:new 4736:pub 4721:u64 4715:u64 4695:for 4614:for 4606:for 4557:for 4546:for 4538:for 4515:end 4478:end 4466:... 4454:for 4444:end 4411:... 4372:say 4360:new 4353:for 4329:+= 4266:new 4249:Int 4246:has 4233:Int 4230:has 4217:Any 4214:has 4168:); 4156:(*. 4154:map 4146:new 4142:DNA 4139:say 4123:say 4115:new 4111:DNA 4108:for 4086:){ 4054:new 4044:has 4034:DNA 4029:}; 4019:and 4009:{ . 4004:Str 3980:DNA 3938:# 3 3935:# 2 3932:# 1 3922:say 3796:say 3781:for 3762:say 3743:for 3724:say 3713:for 3656:# 3 3653:# 2 3650:# 1 3640:say 3629:for 3592:map 3588:for 3481:try 3415:key 3406:(): 3385:key 3382:for 3366:key 3339:key 3336:for 3294:for 3271:for 3174:new 2998:!== 2824:key 2809:key 2525:'s 2523:PHP 2510:PHP 2381:(@( 2328:for 2321:end 2291:for 2272:for 2205:map 2195:In 2164:obj 2152:out 2131:obj 2122:for 2115:for 2093:for 2016:out 2007:()) 1968:out 1956:()) 1935:(); 1851:}); 1839:std 1821:std 1797:(), 1794:end 1785:(), 1764:std 1722:)); 1701:std 1680:std 1677:(), 1674:end 1665:(), 1644:std 1615:(), 1612:end 1603:(), 1582:std 1567:std 1549:std 1487:end 1452:or 1395:std 1371:for 1341:std 1323:(); 1320:end 1305:(); 1281:for 1206:int 1194:std 1132:C++ 1126:C++ 1035:()) 1017:(); 840:C++ 821:PHP 790:STL 747:C++ 681:or 655:sed 651:AWK 621:C++ 599:). 589:end 528:for 493:Lua 477:C++ 428:map 409:map 395:An 367:100 352:for 298:for 262:def 163:CLU 158:. 121:In 45:by 5837:: 5824:- 5602:^ 5568:^ 5534:^ 5500:^ 5491:. 5411:}} 5407:{{ 5331:}} 5327:{{ 5319:. 5244:^ 5232:}} 5228:{{ 5221:. 5193:}} 5189:{{ 5181:. 5163:^ 5154:. 5129:. 5107:^ 5097:. 5025:); 4998:). 4986:). 4968:in 4954::: 4839::: 4809:fn 4745:() 4739:fn 4724:); 4674:, 4670:, 4666:, 4593:); 4572:42 4569:.. 4563:in 4497:do 4488:42 4469:42 4460:in 4426:do 4414:42 4374:} 4366:, 4316:if 4312:Mu 4299:{ 4272:, 4254:= 4239:is 4223:is 4160:). 4152:). 4125:} 4102:). 4017:) 4001:of 3917:; 3908:if 3887:my 3865:my 3863:; 3859:, 3855:, 3851:= 3846:my 3801:~ 3767:} 3756:, 3750:kv 3711:; 3703:, 3695:, 3687:= 3682:my 3667:kv 3645:} 3627:; 3623:, 3619:, 3615:= 3610:my 3594:, 3574:. 3520:it 3502:() 3493:it 3454:it 3394:in 3342:in 3300:in 3240:as 3204:); 3165:); 3034:), 2995:() 2968:() 2917:); 2890:() 2839:); 2812:() 2761:); 2734:() 2719:); 2677:() 2579:. 2494:, 2470:. 2405:); 2399:), 2211:, 2207:, 2167:); 2031:); 1992:if 1897:. 1842::: 1824::: 1767::: 1731:, 1716:\n 1704::: 1683::: 1647::: 1621:); 1585::: 1570::: 1552::: 1493:. 1478:. 1466:, 1398::: 1356:it 1344::: 1329:it 1326:++ 1311:!= 1308:it 1290:it 1275:); 1254:); 1233:); 1197::: 1175:++ 1167:++ 1142:, 1101:); 1077:in 1059:); 979:. 961:C# 792:) 657:. 571:do 534:in 520:. 503:, 499:, 495:, 487:, 485:Go 475:, 473:C# 446:** 370:): 358:in 316:): 304:in 274:): 198:A 5752:. 5731:. 5710:. 5676:. 5655:. 5634:. 5596:. 5562:. 5528:. 5466:. 5439:. 5417:) 5403:. 5381:. 5359:. 5337:) 5297:. 5277:. 5238:) 5199:) 5028:} 5019:( 5013:{ 5010:) 5007:4 5004:( 4995:2 4992:( 4983:1 4980:( 4974:. 4965:n 4949:= 4940:} 4937:} 4934:) 4928:( 4922:; 4916:+ 4913:0 4910:. 4904:= 4901:1 4898:. 4892:; 4889:1 4886:. 4880:= 4877:0 4874:. 4868:; 4865:0 4862:. 4856:= 4847:{ 4827:) 4815:( 4806:; 4800:= 4791:{ 4776:} 4773:} 4770:) 4767:1 4764:, 4761:0 4758:( 4752:{ 4733:{ 4718:, 4712:( 4630:T 4596:} 4590:i 4587:, 4581:( 4575:{ 4566:0 4560:i 4512:n 4506:| 4503:n 4500:| 4491:. 4475:n 4463:0 4457:n 4441:n 4435:| 4432:n 4429:| 4420:. 4417:) 4408:0 4405:( 4368:3 4362:( 4358:. 4331:1 4280:. 4268:( 4256:1 4164:( 4148:( 4144:. 4117:( 4113:. 4100:3 4098:( 4094:. 4090:. 4082:( 4067:. 4056:( 4027:3 4021:. 4013:( 3896:. 3874:. 3861:3 3857:2 3853:1 3805:{ 3786:. 3748:. 3709:3 3701:2 3693:1 3625:3 3621:2 3617:1 3600:. 3550:) 3544:( 3535:: 3523:) 3517:( 3511:= 3496:. 3490:= 3484:: 3478:: 3469:) 3463:( 3457:= 3424:) 3418:, 3412:( 3400:. 3388:, 3375:) 3369:, 3363:( 3354:= 3348:: 3318:) 3312:( 3306:: 3273:( 3255:} 3249:{ 3246:) 3237:) 3231:, 3225:( 3213:( 3198:, 3192:, 3186:, 3180:( 3171:= 3159:| 3153:( 3101:. 3091:. 3055:} 3052:} 3049:; 3040:; 3028:: 3022:? 3016:( 3013:, 3004:; 2983:= 2977:{ 2971:: 2956:} 2953:; 2944:; 2938:, 2932:} 2926:{ 2905:( 2899:= 2893:{ 2878:} 2875:; 2866:; 2860:, 2854:} 2848:{ 2827:( 2821:= 2815:{ 2800:} 2797:; 2788:; 2782:, 2776:} 2770:{ 2749:( 2743:= 2737:{ 2722:} 2707:( 2701:; 2695:, 2686:{ 2680:: 2665:} 2662:; 2656:= 2644:{ 2641:) 2632:( 2620:; 2608:{ 2590:; 2453:; 2447:* 2444:2 2441:= 2432:) 2426:( 2420:= 2396:a 2393:( 2387:) 2384:a 2375:= 2366:; 2363:= 2315:) 2312:n 2309:( 2297:= 2294:n 2288:; 2285:= 2244:_ 2241:. 2235:. 2229:. 2170:} 2161:( 2155:. 2149:. 2143:{ 2140:) 2134:: 2125:( 2095:( 2034:} 2025:( 2019:. 2013:. 2001:. 1995:( 1983:. 1977:( 1971:. 1965:. 1959:{ 1950:. 1944:( 1929:. 1923:= 1848:; 1833:i 1818:{ 1815:) 1812:i 1800:( 1791:. 1788:c 1779:. 1776:c 1773:( 1755:; 1752:c 1710:, 1698:( 1671:. 1668:c 1659:. 1656:c 1653:( 1609:. 1606:c 1597:. 1594:c 1591:( 1579:} 1576:; 1561:i 1543:{ 1540:) 1537:i 1525:( 1513:; 1510:c 1416:} 1410:; 1407:x 1392:{ 1389:) 1383:: 1380:x 1374:( 1365:} 1359:; 1353:* 1335:{ 1332:) 1317:. 1299:. 1293:= 1284:( 1272:9 1269:( 1263:. 1251:2 1248:( 1242:. 1230:5 1227:( 1221:. 1215:; 1159:* 1152:C 1095:( 1089:. 1083:) 1068:( 1053:. 1047:( 1041:. 1029:. 1023:( 1011:. 1005:= 967:( 685:. 614:= 580:| 574:| 565:. 552:) 546:( 540:: 458:) 452:, 449:2 443:x 440:: 437:x 431:( 425:= 419:= 385:) 379:( 364:( 349:b 346:+ 343:a 340:, 337:b 334:= 331:b 328:, 325:a 322:a 310:( 301:_ 295:1 292:, 289:0 286:= 283:b 280:, 277:a 268:( 112:) 106:( 101:) 97:( 87:Β· 80:Β· 73:Β· 66:Β· 39:.

Index


verification
improve this article
adding citations to reliable sources
"Iterator"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
computer programming
object
collection
interface
coupled
database cursor
CLU
Iterator pattern
loop counter
loop counter
Generator (computer science)
coroutine
generator
subroutine
tree traversers
Python
constructor
Fibonacci numbers
higher order function

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑