Created
April 25, 2016 19:24
-
-
Save m0wfo/725b50f41494eb9fdd56f08ad955e0a5 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
def setup_something(): | |
# do some kind of setup | |
return 1 | |
def finish_doing_something(arg): | |
# do something else | |
print(str(arg)) | |
def do_work(work): | |
val = setup_something() | |
return finish_doing_something(work(val)) | |
def some_method_a(): | |
return do_work(lambda val: 2) | |
def some_method_b(): | |
return do_work(lambda val: 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment