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.3.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for functionalstream-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7963874d09e065bad70a93261196abc73653e9a9d431b3626bf9005a5b705f60 |
|
MD5 | 6eb15fcdda2ef64302d5dddc4f3c0151 |
|
BLAKE2b-256 | ecc3866cbb7c937388e196a2e29010755175f9498240487979079806671863fa |