Closure (computer programming): Difference between revisions

Content deleted Content added
Anonymous functions: Add comments
Tags: Reverted Mobile edit Mobile web edit
Undid revision 1119012726 by 85.129.40.72 (talk) use Talk:Closure (computer programming) or WP:REFDESK
Line 23:
def g(y):
return x + y
return g # Return a closure.
return g # Return a closure. This requires review: is g a closure or is f a closure? The rest of the section in this python example suggests “f assigning x with 1” is a closure
 
def h(x):