1 Beginning Student
2 Beginning Student with List Abbreviations
3 Intermediate Student
4 Intermediate Student with Lambda
5 Advanced Student
Index
On this page:
define
lambda
define-struct
cond
else
if
and
or
check-expect
check-within
check-error
empty
true
false
require
Version: 4.0.2

 

2.4 Unchanged Forms

(define (id id id ...) expr)

(define id expr)

(define id (lambda (id id ...) expr))

lambda

The same as Beginning’s define.

(define-struct structid (fieldid ...))

The same as Beginning’s define-struct.

(cond [expr expr] ... [expr expr])

else

The same as Beginning’s cond.

(if expr expr expr)

The same as Beginning’s if.

(and expr expr expr ...)

(or expr expr expr ...)

The same as Beginning’s and and or.

(check-expect expr expr)

(check-within expr expr expr)

(check-error expr expr)

The same as Beginning’s check-expect, etc.

empty : empty?

true : boolean?

false : boolean?

Constants for the empty list, true, and false.

(require string)

The same as Beginning’s require.