You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
584 B
Markdown
22 lines
584 B
Markdown
# Boxes
|
|
|
|
A _box_ is like a single-element vector. It can print as a quoted `#&`
|
|
followed by the printed form of the boxed value. A `#&` form can also be
|
|
used as an expression, but since the resulting box is constant, it has
|
|
practically no use.
|
|
|
|
Examples:
|
|
|
|
```racket
|
|
> (define b (box "apple"))
|
|
> b
|
|
'#&"apple"
|
|
> (unbox b)
|
|
"apple"
|
|
> (set-box! b '(banana boat))
|
|
> b
|
|
'#&(banana boat)
|
|
```
|
|
|
|
> +\[missing\] in \[missing\] provides more on boxes and box procedures.
|