DynamicExpresso icon indicating copy to clipboard operation
DynamicExpresso copied to clipboard

Prototype to capture variables so that they can be used in an inner lambda

Open metoule opened this issue 4 years ago • 0 comments

The idea is:

  • use a dictionary to store captured variables (= parameters from all levels of lambda expressions)
  • when parsing an expression, first assign the captured parameter to the dictionary

For example, it we parse x + 5, and call f(2) we convert it to:

dict["x"] = 2;
return dict["x"] + 5;

Fix #212

metoule avatar Dec 14 '21 08:12 metoule