An open API service indexing awesome lists of open source software.

https://github.com/buckley-w-david/pipe

pipe is for composing functions
https://github.com/buckley-w-david/pipe

Last synced: 7 months ago
JSON representation

pipe is for composing functions

Awesome Lists containing this project

README

          

# pipe

`pipe` is a simple implementation of function piping in Python.

```python3
>>> from pipe import Pipe
>>> from operator import add, sub, mul, truediv as div
>>> from functools import partial
>>> result = Pipe() | partial(add, 2, 3) | partial(mul, 10) | partial(div, 1250) | partial(sub, 45) | int
>>> print(result.value)
20
```