Closed dbaron closed 2 years ago
(Also, if the "states" variable is intended, then it's worth also examining the "If t’s value does not match 0" in step 7, since the definition of match presumably doesn't use the "states" variable... although it's not really formally clear on what list of states it does use.)
Good catch, this was a brain fart on my part. It's meant to look at the existing |states| variable; the point of steps 3 and 6 (and 4) is to channel string-based values to/from integers, so I can operate on ints in step 5.
Tho, hm, I suppose I should maintain whether the value was originally an int or string; as written, it'll convert itself to a string if possible, even if it started as an int.
since the definition of match presumably doesn't use the "states" variable
Ah indeed, I'll need to amend the algo to (optionally?) take a states value.
Step 6 in change a toggle currently starts with:
This doesn't make sense, because a toggle's value can't be a list of idents.
I think this was intended to say "t's states" rather than "t's value", but it's also possible that it should refer to the "states" variable that's already in the algorithm, depending on whether tSpec is intended to override in this case. (The current wording makes me think it's not.)