racket/pkgs/racket-doc/scribblings/guide/boxes.scrbl
Matthew Flatt 2d4f3e2ac9 remove the "racket-pkgs" directory layer
The layer is now redundant, since everything left in "pkgs" is in the
"racket-pkgs" category.
2014-12-08 05:22:59 -07:00

22 lines
537 B
Racket

#lang scribble/doc
@(require scribble/manual scribble/eval "guide-utils.rkt")
@title[#:tag "boxes"]{Boxes}
A @deftech{box} is like a single-element vector. It can print as a
quoted @litchar{#&} followed by the printed form of the boxed value.
A @litchar{#&} form can also be used as an expression, but since the
resulting box is constant, it has practically no use.
@; So what are boxes good for, anyway?
@examples[
(define b (box "apple"))
b
(unbox b)
(set-box! b '(banana boat))
b
]
@refdetails["boxes"]{boxes and box procedures}