JoeStrout / miniscript

source code of both C# and C++ implementations of the MiniScript scripting language
MIT License
280 stars 64 forks source link

[C# != C++] map.replace doesn't replace in locals in MM #114

Open marcgurevitx opened 11 months ago

marcgurevitx commented 11 months ago

Difference in behavior locals.replace in Mini Micro and the command line version:

Mini Micro

]x = 42
]locals.replace 42, 43
]print x
42
]

Command line

> x = 42
> locals.replace 42, 43
{"x": 43, "_": {"x": 43, "_": {"x": 43, "_": {...}}}}
> print x
43