Update README.md
This commit is contained in:
parent
a60c04fed8
commit
ec826f0068
|
@ -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