Rust-like iterator for Python
Project description
ziper
Rust-like iterator for Python
Install
pip install ziper
Usage
from ziper import Iter
xs = ['1', '2', 'a', '3', '4', 'b', 'c']
ys = [6, 7, 8, 9]
evens: list = (
Iter(xs)
.filter(lambda x: x.isdecimal())
.map(int)
.chain(ys)
.filter(lambda x: x % 2 == 0)
.collect(list)
)
assert evens == [2, 4, 6, 8]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ziper-0.1.5.tar.gz
(6.2 kB
view hashes)
Built Distribution
ziper-0.1.5-py3-none-any.whl
(6.8 kB
view hashes)