Created
July 8, 2013 12:50
-
-
Save public/5948517 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 block(func, args): | |
def decorator(f2): | |
return func(f2, args) | |
return decorator | |
@block(map, range(10)) | |
def square(x): | |
return x**2 | |
print(repr(square)) | |
print(repr(list(square))) |
Author
public
commented
Jul 8, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment