Metadata-Version: 2.1
Name: trick
Version: 0.1.0
Summary: A collection of some helper functions
License: MIT
Author-email: Elliot <hack00mind@gmail.com>
Requires-Python: >=3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Project-URL: homepage, https://github.com/Eliot00/python-trick
Description-Content-Type: text/markdown

# python-trick

一些helper函数合集。

## Reference

### compose

```python
def add_ten(x: int) -> int:
    return x + 10

def multi_five(x: int) -> int:
    return x * 5

add_ten_then_multi_five = compose(multi_five, add_ten)

add_ten_then_multi_five(2)  # output: 60
```

### curry

```python
@curry
def add(a, b, c, d):
    return a + b + c + d

assert add(1, 2, 3, 4) == add(1)(2)(3)(4)
```

