How should I perform iterators composition?
Should I use zero-functional? maybe itertools? or are there other recommendations?
I want to do something like:
for item in thisIsMyIterator.filter1.filter2.:
....
My package Slicerator contains a ForloopStmt macro which gives a relatively ergonomic API to filter, map, and unpack(I need to figure out a pluggable way of making operations).
const data = "1000\n2000\n3000\n4000\n5000\n6000"
for x in chain data.splitLines.map(parseint(x) * 2).filter(x < 3000):
check x == 2000
for x in chain splitLines(data).filter(x[0] notin {'3', '5'}).map(parseint(x)):
check x in [1000, 2000, 4000, 6000]