top | item 20864347

(no title)

normalhuman | 6 years ago

> How can it be a state machine if you aren't mutating it?

You are confusing a state machine (which is an abstract model of computation) with the behavior of a program implementing it. The set of possible states and the conditions of transition from one state to the next never change.

These conditions can depend on mutable state, as is the case described by the author (in this case, mutable state is kept in the current and previous node pointers).

discuss

order

No comments yet.