PVTS
Home
Download
Language
PROGRAM
DEF-OR-EXP
...
DEF-OR-EXP
DEFINITION
EXPRESSION
DEFINITION
(
define
(
NAME
NAME
...)
EXPRESSION
)
(
define
NAME
EXPRESSION
)
EXPRESSION
(
set!
NAME
EXPRESSION
)
(
lambda
(
NAME
...)
EXPRESSION
)
(
let
((
NAME
EXPRESSION
) ...)
EXPRESSION
)
(
PRIM-OP
EXPRESSION
...)
(
cond
(
EXPRESSION
EXPRESSION
) (
EXPRESSION
EXPRESSION
) ...)
(
cond
(
EXPRESSION
EXPRESSION
) ... (
else
EXPRESSION
))
(
if
EXPRESSION
EXPRESSION
EXPRESSION
)
(
and
EXPRESSION
EXPRESSION
EXPRESSION
...)
(
or
EXPRESSION
EXPRESSION
EXPRESSION
...)
NAME
'
QUOTED
NUMBER
STRING
CHARACTER
NAME
a sequence of keyboard characters not including: space " , ' ` ( ) [ ] { } | ; #
QUOTED
NAME
NUMBER
STRING
CHARACTER
'
QUOTED
PRIM-OP
s
Numbers: Integers, Reals.
*
:
(num num num ... -> num)
+
:
(num num num ... -> num)
-
:
(num num ... -> num)
/
:
(num num num ... -> num)
<
:
(real real real ... -> boolean)
<=
:
(real real real ... -> boolean)
=
:
(num num num ... -> boolean)
>
:
(real real real ... -> boolean)
>=
:
(real real ... -> boolean)
abs
:
(real -> real)
acos
:
(num -> num)
asin
:
(num -> num)
atan
:
(num -> num)
ceiling
:
(real -> int)
cos
:
(num -> num)
even?
:
(integer -> bool)
exp
:
(num -> num)
expt
:
(num num -> num)
floor
:
(real -> int)
gcd
:
(int int -> int)
integer?
:
(any -> bool)
log
:
(num -> num)
max
:
(real real ... -> real)
min
:
(real real ... -> real)
modulo
:
(int int -> int)
negative?
:
(number -> bool)
number?
:
(any -> boolean)
odd?
:
(integer -> bool)
positive?
:
(number -> bool)
real?
:
(any -> bool)
sin
:
(num -> num)
sqrt
:
(num -> num)
tan
:
(num -> num)
zero?
:
(number -> bool)
Booleans
boolean?
:
(any -> boolean)
not
:
(boolean -> boolean)
Symbols
symbol?
:
(any -> boolean)
Lists
append
:
((listof any) ... -> (listof any))
car
:
((cons Y (listof X)) -> Y)
cdr
:
((cons Y (listof X)) -> (listof X))
caar
:
((listof any)) -> any)
cadr
:
((listof any) -> (listof any))
caaar
:
((listof any)) -> any)
caadr
:
((listof any) -> (listof any))
caaaar
:
((listof any)) -> any)
caaadr
:
((listof any) -> (listof any))
cadar
:
((listof any)) -> any)
caddr
:
((listof any) -> (listof any))
cadaar
:
((listof any)) -> any)
cadadr
:
((listof any) -> (listof any))
caadar
:
((listof any)) -> any)
caaddr
:
((listof any) -> (listof any))
cdar
:
((listof any)) -> any)
cddr
:
((listof any) -> (listof any))
cdaar
:
((listof any)) -> any)
cdadr
:
((listof any) -> (listof any))
cdaaar
:
((listof any)) -> any)
cdaadr
:
((listof any) -> (listof any))
cddar
:
((listof any)) -> any)
cdddr
:
((listof any) -> (listof any))
cddaar
:
((listof any)) -> any)
cddadr
:
((listof any) -> (listof any))
cdddar
:
((listof any)) -> any)
cddddr
:
((listof any) -> (listof any))
caddar
:
((listof any)) -> any)
cadadr
:
((listof any) -> (listof any))
cdadar
:
((listof any)) -> any)
cons
:
(X (listof X) -> (listof X))
length
:
(list -> number)
list
:
(any ... (listof any) -> (listof any))
list
:
(any ... -> (listof any))
list?
:
(any -> boolean)
member
:
(any list -> (union false list))
null?
:
(any -> boolean)
reverse
:
(list -> list)
set-car!
:
((cons Y (listof X)) Y -> void)
set-cdr!
:
((cons Y (listof X)) (listof X) -> void)
Characters
char?
:
(any -> boolean)
Strings
string?
:
(any -> boolean)
Misc
eq?
:
(any any -> boolean)
equal?
:
(any any -> boolean)
eqv?
:
(any any -> boolean)
Higher-Order Functions
apply
:
((X-1 ... X-N -> Y) X-1 ... X-i (list X-i+1 ... X-N) -> Y)
for-each
:
((any ... -> any) (listof any) ... -> void)
map
:
((X ... -> Z) (listof X) ... -> (listof Z))
procedure?
:
(any -> boolean)
Printing
display
:
(any -> void)
newline
:
(-> void)