mers/examples/modify_variable.mers

11 lines
297 B
Plaintext

// NOTE: Might change, but this is the current state of things
x := 10
t := thread(() {
sleep(0.25)
println(x.to_string())
})
&x = 20 // -> 20 20 because it modifies the original variable x
// x := 20 // -> 10 20 because it shadows the original variable x
t.await()
println(x.to_string())