A class of objects which can be ‘stepped through’. Repeated applications of nextItem is guaranteed never to return duplicate items and only return “failed” after exhausting all elements of the domain. This assumes that the sequence starts with
init(). For infinite domains, repeated application of nextItem is not required to reach all possible domain elements starting from any initial element. Conditional attributes: infinite repeated
's are never “failed”.
- init: %
init()chooses an initial object for stepping.
- nextItem: % -> Union(%, failed)
nextItem(x)returns the next item, or “failed” if domain is exhausted.