Thanks for taking the time to explain all the little details.
#state("test", 0).update(cs => cs += 1)
// Wouldn't even make sense, because if we don't use a function we would do, for example:
#state("test", 0).update(1)
Is the following description of states accurate? States themselves never change, but instead we put down markers (which live in the content) that are used to compute what the value of state at a given position should be. The markers that we put down only have the name of the state and the desired operation. When we call state.get(), we’re taking that state’s initial value, applying all the markers that match its name that we’ve seen thus far, and giving the result.
I have a related question, then, about another function of metadata. Since the contained state itself isn’t updated, is there a way to query the final value of a state from the CLI?