A query cannot change state. A command can change state.
A pure function should be deterministic. In other words, the output of a
given query should always be the same for the given input.
Haskell has an IO box. The IO of integer in haskell is an interpretation of
all the integers in the world as long as you don't look in the box.