Reference: PLT Scheme

1`` | Language Model
2`` | Syntactic Forms
3`` | Datatypes
4`` | Structures
5`` | Classes and Objects
6`` | Units
7`` | Contracts
8`` | Pattern Matching
9`` | Control Flow
10`` | Concurrency
11`` | Macros
12`` | Input and Output
13`` | Reflection and Security
14`` | Operating System
15`` | Memory Management
16`` | Running PLT Scheme
| Bibliography
| Index

On this page:

box?
box
box-immutable
unbox
set-box!

Version: 4.0.2
contents index
← prev up next →

#### 3.12`` Boxes

(box? v) → boolean?
v : any/c

Returns #t if v is a box, #f otherwise.

(box v) → box?
v : any/c

Returns a new mutable box that contains v.

(box-immutable v) → (and/c box? immutable?)
v : any/c

Returns a new immutable box that contains v.

(unbox box) → any/c
box : box?

Returns the content of box. For any v, (unbox (box (scheme v))) returns v.

(set-box! box v) → void?
box : (and/c box? (not/c immutable?))
v : any/c

Sets the content of box to v.

contents index
← prev up next →