a bit of cleanup

still from the long-ago days when symbols couldn't be assignment targets directly
This commit is contained in:
dzaima 2025-03-12 05:22:11 +02:00
parent 577b09a062
commit 0c2fb1a267

View File

@ -300,9 +300,9 @@ def acc{unr, init:T} = {
a0v := init
def a0 = tup{a0v}
def a1 = @collect(unr) { reg:=init }
def op{S=='get'} = a0v
def op{S=='tr', F} = { a0v = tree_fold{F, a1} }
def op{S=='upd', is, F} = {
def op{'get'} = a0v
def op{'tr', F} = { a0v = tree_fold{F, a1} }
def op{'upd', is, F} = {
if (length{is}==1) a0 = F{a0}
else a1 = F{a1}
}