Merge branch 'master' of https://github.com/Cutipus/function-composition
This commit is contained in:
commit
702bcb09ba
|
@ -0,0 +1,17 @@
|
||||||
|
# Function Composition
|
||||||
|
|
||||||
|
Allows you to compose functions seemlessly.
|
||||||
|
|
||||||
|
```python
|
||||||
|
>>> from compose import Compose
|
||||||
|
>>> def add2(x):
|
||||||
|
... return x + 2
|
||||||
|
...
|
||||||
|
>>> def mul3(x):
|
||||||
|
... return x * 3
|
||||||
|
...
|
||||||
|
>>> Compose >> add2 >> mul3
|
||||||
|
add2 >> mul3
|
||||||
|
>>> Compose >> add2 >> mul3 | 10
|
||||||
|
36
|
||||||
|
```
|
Loading…
Reference in New Issue