Closures/Value capture: Difference between revisions

Content deleted Content added
Added Quackery.
Line 1,755:
<lang python>funcs=[eval("lambda:%s"%i**2)for i in range(10)]
print funcs[3]() # prints 9</lang>
 
=={{header|Quackery}}==
 
<lang Quackery> [ table ] is functions
 
10 times
[ i^ ' [ dup * ] join
' functions put ]
 
5 functions do echo</lang>
 
{{out}}
 
<pre>25</pre>
 
=={{header|R}}==