2 ms·
> It could be even better if we can have function composition. I think composition and piping are such basic programming tools that make a lot of code much cle
by architech 5y ago
> It could be even better if we can have function composition.
I think composition and piping are such basic programming tools that make a lot of code much cleaner. It's a shame they're not built-in in Python.
So, shameless plug, in the spirit of functools and itertools I made the pipetools library [0]. On top of forward-composition and piping it also enables more concise lambda expressions (e.g. X + 1) and more powerful partial application.
[0] https://0101.github.io/pipetools/doc/ https://0101.github.io/pipetools/doc/