An iterator that maps each item to a pair containing the item with its

current count.

Introduced properties

Redefined properties

redef type SELF: EnumerateIter[E]

functional $ EnumerateIter :: SELF

Type of this instance, automatically specialized in every class
redef fun item: Pair[Int, E]

functional $ EnumerateIter :: item

The current item.

All properties

type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
abstract fun item: E

core :: Iterator :: item

The current item.
package_diagram functional::EnumerateIter EnumerateIter

Ancestors

interface Iterator[E: nullable Object]

core :: Iterator

Iterators generate a series of elements, one at a time.
interface Object

core :: Object

The root of the class hierarchy.

Class definitions

functional $ EnumerateIter
# An iterator that maps each item to a pair containing the item with its
# current count.
class EnumerateIter[E]
        super FunIter[E, Pair[Int,E]]

        redef fun item
        do
               return new Pair[Int,E](0, my_iter.item)
        end
end
lib/functional/iter_extras.nit:268,1--277,3