A functional interface for python iterator
Project description
functionalstream
Installation
pip install functionalstream
Example
from functionalstream import Stream
# lst1 = [0, 6, 12, 18, 24]
lst1 = Stream(range(10)).filter(lambda x: x % 2 == 0).map(lambda x: x * 3).to_list()
# lst2 = [(1, 2), (3, 4)]
lst2 = Stream([(1,2), (3,4), (6,5)]).filter(lambda x, y: x < y, star=True).to_list()
# array = array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
array = Stream(range(10)).to_numpy_array(dtype=float)
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
functionalstream-0.1.5.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for functionalstream-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab7a08281f16a32166bc47170f1a4b234d39ab53469c957cede9c75b3bdf98eb |
|
MD5 | 9c31de260de43c2990c6b5f1531370cf |
|
BLAKE2b-256 | 1315077a8a94bbad072443a93c1d62e9407922d0a5eac6bfc0406caec29c9079 |