Next: Procedures Up: Basic Data Extensions Previous: Lists

# Boxes

MzScheme provides boxes, records with a single mutable field:

- `(box v)` returns a new box that contains v.
- `(unbox box)` returns the content of box. For any v, `(unbox (box v))` returns v.
- `(set-box! box v)` sets the content of box to v.
- `(box? v)` returns `#t` if v is a box, `#f` otherwise.

Two boxes are `equal?` if the contents of the boxes are `equal?`.