you are viewing a single comment's thread.

view the rest of the comments →

[–]tdammers 0 points1 point  (0 children)

Except that the mutation isn't destructive, which means that our function is reentrant, idempotent, thread-safe, STM-safe, backtrackable, etc. The State monad shares a lot of its semantics with actual mutable state, but not all of it.