3 ms·
It generalizes to arbitrary state machines- check out the reference near the end to session types. Each state is a type, methods consume their receiver (the "m
by Rusky 7y ago
It generalizes to arbitrary state machines- check out the reference near the end to session types.
Each state is a type, methods consume their receiver (the "move state") and return the new state. You can't accidentally keep around a copy of the old state.