Created
February 12, 2016 21:00
-
-
Save ehermes/e87ef054ad4eb9c342d8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 make_incrementors(start, amounts): | |
| y = [start] | |
| results = [] | |
| for x in amounts: | |
| def add_x(): | |
| y[0] += x | |
| return y[0] | |
| results.append(add_x) | |
| return results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment