如何在生命文章中写一个闭包?

tok*_*oka 1 closures livescript

如何在lifecript中写一个闭包

for i from 1 to 10
  cb = -> console.log i
  set-timeout cb, i*1000
Run Code Online (Sandbox Code Playgroud)

获得1到10而不是10倍10?

unc*_*chu 5

for let i from 1 to 10
  cb = -> console.log i
  set-timeout cb, i*1000
Run Code Online (Sandbox Code Playgroud)