Python: nested lambdas — `s_push: parser stack overflow Memory Error`
I recently stumbled across this article which describes how to code FizzBuzz using only Procs in Ruby, and since I was bored, thought it would be neat to try and implement the same thing in Python using lambdas. I got to the section where you create numbers using nested functions, and wrote the following Python script: #!/usr/bin/env python zero = lambda p : (lambda x: x) one = lambda p : (lambda x: p(x)) two = lambda p : (lambda x: p(p(x))) three = lambda p : (lambda x: p(p(p(x)))) five = lambda p: (lambda x: p(p(p(p(p(x)))))) fifteen = lambda p : (lambda x: p(p(p(p(p( \ p(p(p(p(p( \ p(p(p(p