Previous: The universal type, Up: Other builtin types   [Contents]


3.1.2.4 The “state-of-the-world” type

The type io.state is defined in the standard library module io, and represents the state of the world. Predicates which perform I/O are passed the only reference to the current state of the world, and produce a unique reference to the new state of the world. In this way, we can give a declarative semantics to code that performs I/O.