Closures/Value capture: Difference between revisions

Content added Content deleted
Line 936:
 
for i in 0..9:
let x(proc = i
funcs.add(proc (): int =let x *= x)i
funcs.add(proc (): int = x * x))()
 
for i in 0..8: