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:
boolean?
equal?
eqv?
eq?

contents

 index

← prev  up  next →

 

4.1 Booleans

True and false are represented by the values #t and #f, respectively, though operations that depend a boolean value typically treat anything other than #f as true.

See also: and, or, andmap, ormap.

(boolean? v)  boolean?

  v : any/c

Returns #t if v is #t or #f, #f otherwise.

(equal? v1 v2)  boolean?

  v1 : any/c

  v2 : any/c

Two values are equal? if and only if they are eqv?, unless otherwise specified for a particular datatype.

Datatypes with further specification of equal? include strings, byte strings, numbers, pairs, vectors, and hash tables.

(eqv? v1 v2)  boolean?

  v1 : any/c

  v2 : any/c

Two values are eqv? if and only if they are eq?, unless otherwise specified for a particular datatype.

The number and character datatypes are the only ones for which eqv? differs from eq?.

(eq? v1 v2)  boolean?

  v1 : any/c

  v2 : any/c

Return #t if v1 and v2 refer to the same object, #f otherwise. See also Object Identity and Comparisons.

 

contents

 index

← prev  up  next →