racket/collects/scribblings/guide/boxes.scrbl
Matthew Flatt 39cedb62ed v3.99.0.2
svn: r7706
2007-11-13 12:40:00 +00:00

24 lines
544 B
Racket

#lang scribble/doc
@require[scribble/manual]
@require[scribble/eval]
@require["guide-utils.ss"]
@title[#:tag "boxes"]{Boxes}
A @defterm{box} is like a single-element vector. It prints as
@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}