Skip to content

Instantly share code, notes, and snippets.

@letoh
Created October 2, 2012 13:10
Show Gist options
  • Select an option

  • Save letoh/3818999 to your computer and use it in GitHub Desktop.

Select an option

Save letoh/3818999 to your computer and use it in GitHub Desktop.
# http://www.ptt.cc/bbs/Python/M.1349181219.A.3C5.html
def main():
sum = lambda d: (lambda f,a:f(f,a))((lambda s,l,a=0:a if not l else s(s,l[1:],a+l[0])),d)
print sum([3,3,2,2,1])
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment