

Link: http://codepad.org/9mVtcgxf raw code | output | fork | 1 comment ]



aaronla - Python , pasted on Sep 30:

1 2 3 4 5 6 7 def e ( x ): return e ( x - 1 ) if x else 0 def e ( x , e = e ): return e ( x - 1 ) if x else 1 for x in range ( 0 , 5 ): print "even %i -> %i " % ( x , e ( x ))



Output: 1 2 3 4 5 even 0 -> 1 even 1 -> 0 even 2 -> 1 even 3 -> 0 even 4 -> 1