monad.types.lazysequence - a sequence type with lazy evaluation.
Bases: _abcoll.Sequence
Sequence with lazy evaluation.
>>> from itertools import count >>> seq = LazySequence(count()) >>> seq[1] 1 >>> list(seq[3:5]) [3, 4] >>> list(seq[:20:2]) [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
Proxy to self that forces evaluation when accessed.