Closures/Value capture: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
(→Insitux: inclusion) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 2,268:
Whenever we call a continuation, the <code>(block sqr ...)</code> environment is restored. and the suspended computation inside the block resumes by returning out of the <code>(suspend ...)</code> form normally. The block then executes to completion, returning the <code>(* cap cap)</code> form's value. At that point, our call to the continuation terminates, yielding that value.
=={{header|Wren}}==
<syntaxhighlight lang="
for (i in 0...fs.count) {
fs[i] = Fn.new { i * i }
Line 2,287:
Function #8: 64
</pre>
=={{header|Yabasic}}==
<syntaxhighlight lang="Yabasic">
|