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.1.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for nr.stream-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37b50a86363345f173913bdbfc8d8c2d1c8c91694c246b187a34d750f10fe1e6 |
|
MD5 | 1e140802f940e840e9e9ed53acfee8b7 |
|
BLAKE2b-256 | 20470b6bcdbf1ba367335bc3b4c853639283bb15e481bea9c0ab7328d385a303 |