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.4.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for functionalstream-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9b31430621354be6f0f5034a0a574d32650b0777f8e5e20d1151c91a3d46a86 |
|
MD5 | 15a6b9f0c3b5e4f655620031b8177648 |
|
BLAKE2b-256 | c9095bb773038ef0d74248ac7d33eb7fe85861ec5a51756e24e5ce521a9c2934 |