Open gitonthescene opened 1 year ago
One way to make this work is to simply replace f
with abc[`f]
and reevaluate it. I haven't thought through how to fully test how this feature actually works in k2.8.
Interestingly, if I try to access a global in this expression it errors:
b:7
@[t;"+[f;b]"]
@[t;"+[f;b]"]
value error
b
It feels like if Amend is given a string, then that string is passed through the parser again, but with the dictionary itself replacing "globals".
I know the goal is to have Kona match K2 and possibly K3. Here's something I discovered when trying to parse sql.k
I.e. it's evaluating
+[f;1]
wheref
is taken as from the tableabc
. (Sincet
is the symbol`abc
it's acting on the global.)This seems like a pretty advanced feature and I was a little surprised to find this worked like this. It feels like it's an early incarnation of expressions in K9.