Closures/Value capture: Difference between revisions

added Arturo
m (fix markup)
(added Arturo)
Line 170:
{{Out}}
<pre>9</pre>
=={{header|Arturo}}==
<syntaxhighlight lang="arturo">funcs: [ø]
 
loop 1..10 'f ->
'funcs ++ function [] with 'f [
f * f
]
 
print call funcs\3 []</syntaxhighlight>
 
{{out}}
 
<pre>9</pre>
 
=={{header|Axiom}}==
Using the Spad compiler:
Line 184 ⟶ 198:
<syntaxhighlight lang="Axiom">[1,4,9,16,25,36,49,64,81,100]
Type: List(Integer)</syntaxhighlight>
 
=={{header|Babel}}==
 
1,532

edits