Function composabiltiy in Python
# Kino Rose - NierPixel - https://nierpixel.com/ | |
# Composing Functions | |
def add(num_one:int, num_two:int)->int: | |
return num_one + num_two | |
def multiply(num_one:int, num_two:int)->int: | |
return num_one * num_two | |
# Three Times Five Composed | |
three_times_five = multiply(add(1, 2), 5) # 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment