Closures/Value capture: Difference between revisions

m
m (→‎{{header|Wren}}: Changed to Wren S/H)
imported>Arakov
Line 649:
</syntaxhighlight>
=={{header|Elena}}==
ELENA 46.1x :
<syntaxhighlight lang="elena">import system'routines;
import extensions;
Line 655:
public program()
{
var functions := Array.allocate(10).populate::(int i => { ^ i * i} );
functions.forEach::(func) { console.printLine(func()) }
}</syntaxhighlight>
{{out}}
Anonymous user