* Modify the semantics of state to be refs instead of values.
* Implement foreach natively.