Macaulay2 » Documentation
Packages » Macaulay2Doc :: 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 = iterator {1, 2, 3}

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.