Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python supports a syntax like your first example by implementing the appropriate magic method for the desired operator and starting the chain with that special object. For example, using just a single pipe: https://flexiple.com/python/python-pipeline-operator

The functions with extra arguments could be curried, or done ad-hoc like lambda v: fun1(v, arg1=1)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: