Use iterators like Java streams.
Project description
Note: This package is in the dangerous land of
0.x.y
versions and may be subject to breaking changes with minor version increments.
nr.stream
Provides a Stream
class which allows chained operations on a stream of values.
Example
from nr.stream import Stream
values = [3, 6, 4, 7, 1, 2, 5]
assert list(Stream(values).chunks(values, 3, fill=0).map(sum)) == [13, 10, 5]
Copyright © 2020 Niklas Rosenstein
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nr.stream-0.2.1.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for nr.stream-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0699e2c503ffc45d320db16a67c7fb67e2af57c44fe48d80d94896a8ff4b1197 |
|
MD5 | 8a9dfed7408ecb1b40b54491a4d0833c |
|
BLAKE2b-256 | 734fd6ed20cec8b2864a55900a02a98ed83594c82010d0b48ef4003454caf43e |