Skip to content

Iterator

Spice
import "std/iterator/iterator";

IIterator<T> interface

The IIterator interface must be implemented in order to be handled as an iterator by Spice. For instance, all elements, implementing the IIterator interface can be looped over by a standard foreach loop.

get

Spice
f<T&> get<T>()

Returns: T&

getIdx

Spice
f<Pair<unsigned long, T&>> getIdx<T>()

Returns: Pair<unsigned long, T&>

isValid

Spice
f<bool> isValid()

Returns: bool

next

Spice
p next()