Created
June 28, 2012 03:23
-
-
Save hidsh/d4d19bfd9da28eb86ce2 to your computer and use it in GitHub Desktop.
python: 高階関数サンプル
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 caller(f): | |
return f(3) | |
>>> caller(lambda x: x*2) | |
6 | |
>>> def qu(n): | |
return n*4 | |
>>> caller(qu) | |
12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment