1 Evaluation Model
2 Syntax Model
3 Core Syntactic Forms
4 Core Datatypes
5 Structures
6 Classes and Objects
7 Units
8 Contracts
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
Index
On this page:
box?
box
box-immutable
unbox
set-box!

contents

 index

← prev  up  next →

 

4.11 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 →