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.1.2.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for nr.stream-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25fc65e7c6fc610871775d59fc15494d1a9b9e9d0b5822354f8885cd77d95721 |
|
MD5 | fd6860d9d45323d1a4a9f81d6175d09e |
|
BLAKE2b-256 | d5c4778bd8f84be041d020275a14e74bd5b7780042b423dbe9c38846be7fd66e |