Clean code for sequence of map/filter/reduce functions

PyFunctional lets you do exactly that after installing via pip install PyFunctional

from functional import seq

seq(some_list).map(lambda x: x -1, a).filter(lambda x: x>0).reduce(lambda x, y: x*y)

The package can do much more than that, which you can checkout at
github.com/EntilZha/PyFunctional

Leave a Comment