Utilities to manipulate variables.
Useful when composing procedures that use variables with others that do not.
proc write[T](self: var T; value: T): var T
proc modify[T](self: var T; f: T -> T): var T
func read[T](self: var T): T