Last active
March 24, 2020 01:00
-
-
Save RadoslawB/9a643123a2f6ac537064cedbf7a48f95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piped = pipe( | |
str.strip, | |
str.capitalize, | |
)(' PIPED ') # -> 'Piped' | |
print(piped) | |
add_one = lambda x: x + 1 | |
double = lambda x: x * 2 | |
composed = compose( | |
add_one, | |
double | |
)(1) # -> 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment