Closures/Value capture: Difference between revisions
Content added Content deleted
(Added Io entry) |
|||
Line 808: | Line 808: | ||
{{out}} |
{{out}} |
||
<pre>Randomly selecting L[8] = 64</pre> |
<pre>Randomly selecting L[8] = 64</pre> |
||
=={{header|Io}}== |
|||
<lang>blist := list(0,1,2,3,4,5,6,7,8,9) map(i,block(i,block(i*i)) call(i)) |
|||
writeln(blist at(3) call) // prints 9</lang> |
|||
=={{header|J}}== |
=={{header|J}}== |