[Python-ideas] map, filter, reduce methods for generators

Jacek Pliszka jacek.pliszka at gmail.com
Fri Apr 11 00:09:22 CEST 2014


OK, if method chaining is a problem, what about:

from StreamAlgebra import Map, Filter, Reduce
from operator import add

range(100) | Filter(f1) | Map(f2) | Filter(f3) | Map(f4) | Reduce(add)

BR,

Jacek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140411/4d479892/attachment.html>


More information about the Python-ideas mailing list