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.3.tar.gz
(6.7 kB
view hashes)
Built Distribution
Close
Hashes for nr.stream-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c55118d56bdd88a4cb2a4809f5cf853963de93ec0d1ce9f28d61792f85617000 |
|
MD5 | 51020d0748314ec4758b0d36e07ed688 |
|
BLAKE2b-256 | 21b938d83aa233f77cd302e3a8863ff6069585d2fff116bf8f0f67d2e65cccb5 |