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
n = 0
f! = ++n
o! (a: f!) = a
console.log (o!)
console.log (o!)
This compiles into something you wouldn't expect, that is, the definition of o is made after an asynchronous call to f, so the first invocation of o comes out as you'd expect with a result of 1, but the second also comes out as 1, whereas you'd expect it to run f again to yield a result of 2.
The text was updated successfully, but these errors were encountered:
Consider this:
This compiles into something you wouldn't expect, that is, the definition of
o
is made after an asynchronous call tof
, so the first invocation ofo
comes out as you'd expect with a result of1
, but the second also comes out as1
, whereas you'd expect it to runf
again to yield a result of2
.The text was updated successfully, but these errors were encountered: