Last active
August 29, 2015 14:02
-
-
Save js947/037ef69ea365736d3e44 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
import operator | |
def frk(a, r, b): | |
return lambda x: r(a(x), b(x)) | |
avg = frk(sum, operator.div, len) | |
ans = avg([1.0, 2.0, 3.0, 4.0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment