Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » Iterator » StopIteration
next | previous | forward | backward | up | index | toc

StopIteration -- stop iteration

Description

This symbol is returned by next to signal that iteration is complete.

i1 : iter = iterator {1, 2, 3}

o1 = iter

o1 : Iterator
i2 : next iter

o2 = 1
i3 : next iter

o3 = 2
i4 : next iter

o4 = 3
i5 : next iter

o5 = StopIteration

o5 : Symbol

See also

For the programmer

The object StopIteration is a symbol.


The source of this document is in Macaulay2Doc/doc_iterators.m2:158:0.