Contents:
streams.Stream
A basic (and rather uninteresting) stream:
>>> for x in Stream(range(3)):
... print(x)
0
1
2
Streams offer various operations as methods. For example getting first 10 even integers:
>>> from itertools import count
>>> Stream(count()).filter(lambda x: x % 2 == 0)[:10].to_list()
[0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
Slicing endless iterators is supported by default.
genindex
modindex
search