You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we know that in coffeescript/iced
[0...4] is [0,1,2,3], and [0..3] is [0,1,2,3] too.
but follow code make different result:
x = []
fun1 = (cb) -> cb 1
for i in [0..3]
await fun1 defer(x[i])
==> x is [1,1,1,1]
for i in [0,1,2,3]
await fun1 defer(x[i])
==> x is [1,1,1,1]
for i in [0...4]
await fun1 defer(x[i])
x is [1,1,1,1,1]
i found that "for i in [0...4] await ..." generate js code like
....
if (!(i <= 4)) {
return _break();
} else {
.....
and iced "for i in [0..3] await ..." generate code all the same except it's 3 rather than 4.
....
if (!(i <= 3)) {
return _break();
} else {
.....
The text was updated successfully, but these errors were encountered:
we know that in coffeescript/iced
[0...4] is [0,1,2,3], and [0..3] is [0,1,2,3] too.
but follow code make different result:
x = []
fun1 = (cb) -> cb 1
for i in [0..3]
await fun1 defer(x[i])
==> x is [1,1,1,1]
for i in [0,1,2,3]
await fun1 defer(x[i])
==> x is [1,1,1,1]
for i in [0...4]
await fun1 defer(x[i])
x is [1,1,1,1,1]
i found that "for i in [0...4] await ..." generate js code like
....
if (!(i <= 4)) {
return _break();
} else {
.....
and iced "for i in [0..3] await ..." generate code all the same except it's 3 rather than 4.
....
if (!(i <= 3)) {
return _break();
} else {
.....
The text was updated successfully, but these errors were encountered: