Base class for Sonolus iterators.
This class is used to define custom iterators that can be used in Sonolus.py.
Inheritors must implement the next
method,
which should return a Maybe[T]
.
Usage
class MyIterator(Record, SonolusIterator):
def next(self) -> Maybe[T]:
...
next() -> Maybe[T]
Return the next item from the iterator as a Maybe
.