composetools-0.5.0
توضیحات
Utility functions for common tasks when composing functions.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | composetools-0.5.0 |
| نام | composetools |
| نسخه کتابخانه | 0.5.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | SeparateRecords |
| ایمیل نویسنده | me@rob.ac |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/composetools/ |
| مجوز | ISC |
# composetools
**A library of utility functions** for Pythonic function composition.<br>
Most utilities are focused on transforming and dealing with iterables.
## Install
```console
pip install composetools
```
## Functions
* `compose`
Compose functions such that `compose(f, g)(x)` is equivalent to `g(f(x))`
* `pipe`
Compose functions such that `pipe(f, g)(x)` is equivalent to `f(g(x))`
### Utilities
* `unique` - Yield unique items of an iterable.
* `each` - Curried `map`.
* `keep` - Curried `filter`.
* `mask` - Curried `itertools.compress`.
* `drop` - Curried `itertools.filterfalse`.
* `sort` - Curried `sorted`.
* `flat` - Flatten an arbitrarily nested iterable to a desired depth.
* `also` - Call a function and return its *input*, eg. `also(print)(4)`
will print 4 and return 4.
## Develop
```console
$ gh repo clone SeparateRecords/python-composetools
$ poetry install
$ poetry run python -m pytest tests.py
```
## Licence
ISC
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl composetools-0.5.0:
pip install composetools-0.5.0.whl
نصب پکیج tar.gz composetools-0.5.0:
pip install composetools-0.5.0.tar.gz