Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data SequenceIterator
- sequenceIteratorType :: Type
- sequenceIteratorNew :: Sequence seq => seq -> IO SequenceIterator
- data CallableIterator
- callableIteratorType :: Type
- callableIteratorNew :: (Object callable, Object sentinel) => callable -> sentinel -> IO CallableIterator
Documentation
data SequenceIterator Source #
Instances
Concrete SequenceIterator Source # | |
Defined in CPython.Types.Iterator concreteType :: SequenceIterator -> Type | |
Iterator SequenceIterator Source # | |
Defined in CPython.Types.Iterator | |
Object SequenceIterator Source # | |
Defined in CPython.Types.Iterator |
sequenceIteratorNew :: Sequence seq => seq -> IO SequenceIterator Source #
Return an Iterator
that works with a general sequence object, seq.
The iteration ends when the sequence raises IndexError
for the
subscripting operation.
data CallableIterator Source #
Instances
Concrete CallableIterator Source # | |
Defined in CPython.Types.Iterator concreteType :: CallableIterator -> Type | |
Iterator CallableIterator Source # | |
Defined in CPython.Types.Iterator | |
Object CallableIterator Source # | |
Defined in CPython.Types.Iterator |
callableIteratorNew :: (Object callable, Object sentinel) => callable -> sentinel -> IO CallableIterator Source #
Return a new Iterator
. The first parameter, callable, can be any
Python callable object that can be called with no parameters; each call
to it should return the next item in the iteration. When callable
returns a value equal to sentinel, the iteration will be terminated.