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
- Host: GitHub
- URL: https://github.com/buckley-w-david/pipe
- Owner: buckley-w-david
- Created: 2018-10-12T16:13:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-12T23:45:06.000Z (almost 7 years ago)
- Last Synced: 2025-01-28T02:12:02.477Z (8 months ago)
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```