Closures/Value capture: Difference between revisions

(→‎{{header|REXX}}: re-worked the program to be in compliance with the task's requirements, added a seed (for the RANDOM BIF) so repeated executions can be scrutinized for different lists and base offsets.)
Line 557:
var functions := Array new length:10; populate(:i)( [ ^ i * i ] ).
functions forEach(:func) [ console writeLine(func eval()). ].
].</lang>
{{out}}
Anonymous user