Variables within closures return wrong values
Closed this issue · 2 comments
jakegut commented
Given:
func foo(a, b){
return func(c){
return [a, b, c]
}
}
foo("hello", "world")("risor")
I expected ["hello", "world", "risor"]
, instead I get: ["world","hello","risor"]
. Reproduced using the code editor on the home page.
I'd be curious to look into this myself and see if I can PR a fix.
myzie commented
This is now available in the v0.13.0 release, and on the editor on https://risor.io.