Closures/Value capture: Difference between revisions
Content added Content deleted
Line 832: | Line 832: | ||
=={{header|Oforth}}== |
=={{header|Oforth}}== |
||
<lang Oforth>func: newClosure(i) { #[ i sq |
<lang Oforth>func: newClosure(i) { #[ i sq ] } |
||
10 seq map(#newClosure) at(7) perform</lang> |
10 seq map(#newClosure) at(7) perform println</lang> |
||
{{out}} |
{{out}} |