aboutsummaryrefslogtreecommitdiffstats
path: root/QUICKREF
blob: 93ca5d4160208d64dd2d7a048dc8a5959d7f5e6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
;; FILE             "Scheme Sigs"
;; IMPLEMENTS   R^4RS Function Signature Synopsis
;; AUTHOR           Kenneth A Dickey
;; DATE             1992 October 2
;; LAST UPDATED 1992 October 3
;; NOTES:  Extracted from Amiga Gambit QuickTour file

=== FUNCTION SYNOPSIS ===

Notation:
  <object>      any Scheme data object.
  <object>*     zero or more objects
  <object>+     one or more objects
  [<object>]    optional object
  ( <whatever> )...   Zero or more occurances of ( <whatever> )

; SYNTAX

  (LAMBDA <name> <exp>+ )
  (LAMBDA (<name>* ) <exp>+ )
  (AND <exp>*)
  (OR  <exp>*)
  (IF <test-exp> <if-true> [<if-false>] )
  (COND (<test> <exp>* )... [(ELSE <exp>+)] )
  (CASE <key-exp> ((<datum>+ ) <exp>* )... [(ELSE <exp>+)] )
  (DEFINE ( <name> <name>* ) <exp>+ )
  (DEFINE <name> <exp> )
  (LET [<name>] ( (<vname> <value-exp>)... ) <exp>+ )
  (LET*   ( (<vname> <value-exp>)... ) <exp>+ )
  (LETREC ( (<vname> <value-exp>)... ) <exp>+ )
  (BEGIN <expression>+ )
  (DO ( (<var> <init> <step>)... ) ( <test> <exp>* ) <exp>* )
  ;; Note also R^4RS syntax, below


; IEEE Scheme

  (NOT <object>)
  (BOOLEAN? <object>)

  (EQ?    <obj1> <obj2>)
  (EQV?   <obj1> <obj2>)
  (EQUAL? <obj1> <obj2>)

  (PAIR? <object>)
  (CONS <obj1> <obj2>)
  (CAR <pair>)
  (CDR <pair>)
  (SET-CAR! <pair> <object>)
  (SET-CDR! <pair> <object>)
  (CAAR  <list>)   (CADR  <list>)   (CDAR  <list>)   (CDDR <list>)
  (CAAAR <list>)   (CAADR <list>)   (CADAR <list>)   (CADDR <list>)
  (CDAAR <list>)   (CDADR <list>)   (CDDAR <list>)   (CDDDR <list>)
  (CAAAAR <list>)  (CAAADR <list>)  (CAADAR <list>)  (CAADDR <list>)
  (CADAAR <list>)  (CADADR <list>)  (CADDAR <list>)  (CADDDR <list>)
  (CDAAAR <list>)  (CDAADR <list>)  (CDADAR <list>)  (CDADDR <list>)
  (CDDAAR <list>)  (CDDADR <list>)  (CDDDAR <list>)  (CDDDDR <list>)
  (NULL? <object>)
  (LIST? <object>)
  (LIST <object>* )
  (LENGTH <list>)
  (APPEND <list>+ )
  (REVERSE <list>)
  (LIST-REF <list> <index>)

  (MEMQ  <object> <list>)
  (MEMV  <object> <list>)
  (MEMBER <object> <list>)

  (ASSQ  <object> <alist>)
  (ASSV  <object> <alist>)
  (ASSOC <object> <alist>)

  (SYMBOL? <object>)  (SYMBOL->STRING <symbol>)  (STRING->SYMBOL <string>)

  (NUMBER? <object>)
  (COMPLEX? <object>)
  (REAL? <object>)
  (RATIONAL? <object>)
  (INTEGER? <object>)
  (EXACT? <number>)     (INEXACT? <number>)
  (=  <number>+ )
  (<  <number>+ )  (>  <number>+ )
  (<= <number>+ )  (>= <number>+ )
  (ZERO? <number>)
  (POSITIVE? <number>)  (NEGATIVE? <number>)
  (ODD? <number>)       (EVEN? <number>)
  (MAX <number>+ )      (MIN <number>+ )
  (+ <number>+ )
  (* <number>+ )
  (- <number>+ )
  (/ <number>+ )
  (ABS <number>)
  (QUOTIENT <num1> <num2>)  (REMAINDER <num1> <num2>)
  (MODULO <num1> <num2>)
  (GCD <number>* )          (LCM <number>* )
  (NUMERATOR <rational>)    (DENOMINATOR <rational>)
  (FLOOR <number>)          (CEILING <number>)
  (TRUNCATE <number>)       (ROUND <number>)
  (RATIONALIZE <num1> <num2>)
  (EXP <number>)            (LOG <number>)
  (SIN <number>)   (COS <number>)   (TAN <number>)
  (ASIN <number>)  (ACOS <number>)  (ATAN <number> [<number>])
  (SQRT <number>)
  (EXPT <num1> <num2>)
  (MAKE-RECTANGULAR <num1> <num2>)  (MAKE-POLAR <num1> <num2>)
  (REAL-PART <number>)       (IMAG-PART <number>)
  (MAGNITUDE <number>)       (ANGLE <number>)
  (EXACT->INEXACT <number>)  (INEXACT->EXACT <number>)
  (NUMBER->STRING <number>)  (STRING->NUMBER <string>)

  (CHAR? <object>)
  (CHAR=?  <char1> <char2>)  (CHAR-CI=?  <char1> <char2>)
  (CHAR<?  <char1> <char2>)  (CHAR-CI<?  <char1> <char2>)
  (CHAR>?  <char1> <char2>)  (CHAR-CI>?  <char1> <char2>)
  (CHAR<=? <char1> <char2>)  (CHAR-CI<=? <char1> <char2>)
  (CHAR>=? <char1> <char2>)  (CHAR-CI>=? <char1> <char2>)
  (CHAR-ALPHABETIC? <character>)
  (CHAR-NUMERIC?    <character>)
  (CHAR-WHITESPACE? <character>)
  (CHAR-UPPER-CASE? <character>)  (CHAR-LOWER-CASE? <character>)
  (CHAR->INTEGER <character>)     (INTEGER->CHAR    <integer>)
  (CHAR-UPCASE   <character>)     (CHAR-DOWNCASE    <character>)

  (STRING? <object>)
  (MAKE-STRING <length> [<character>] )
  (STRING <character>+ )
  (STRING-LENGTH <string>)
  (STRING-REF <string> <index>)
  (STRING-SET! <string> <index> <character>)
  (STRING=?  <string1> <string2>)  (STRING-CI=?  <string1> <string2>)
  (STRING<?  <string1> <string2>)  (STRING-CI<?  <string1> <string2>)
  (STRING>?  <string1> <string2>)  (STRING-CI>?  <string1> <string2>)
  (STRING<=? <string1> <string2>)  (STRING-CI<=? <string1> <string2>)
  (STRING>=? <string1> <string2>)  (STRING-CI>=? <string1> <string2>)
  (SUBSTRING <string> <start-index> <end-index>)
  (STRING-APPEND <string>+ )

  (VECTOR? <object>)
  (MAKE-VECTOR <length> [<object>] )
  (VECTOR <object>* )
  (VECTOR-LENGTH <vector>)
  (VECTOR-REF  <vector> <index>)
  (VECTOR-SET! <vector> <index> <object>)

  (PROCEDURE? <object>)
  (APPLY <procedure> <arg>* <arg-list>)
  (MAP   <procedure> <list>+ )
  (FOR-EACH <procedure> <list>+ )
  (CALL-WITH-CURRENT-CONTINUATION <one-argument-procedure>)

  (CALL-WITH-INPUT-FILE  <string> <procedure>)
  (CALL-WITH-OUTPUT-FILE <string> <procedure>)
  (INPUT-PORT? <object>)  (OUTPUT-PORT? <object>)
  (CURRENT-INPUT-PORT)    (CURRENT-OUTPUT-PORT)
  (OPEN-INPUT-FILE  <string>)       (OPEN-OUTPUT-FILE <string>)
  (CLOSE-INPUT-PORT  <input-port>)  (CLOSE-OUTPUT-PORT <output-port>)
  (EOF-OBJECT? <object>)
  (READ [<input-port>] )
  (READ-CHAR [<input-port>] )
  (PEEK-CHAR [<input-port>] )
  (WRITE   <object> [<output-port>] )
  (DISPLAY <object> [<output-port>] )
  (NEWLINE [<output-port>] )
  (WRITE-CHAR <character> [<output-port>] )


; R4RS Scheme

  (LIST-TAIL <list> <index>)
  (STRING->LIST <string>)
  (LIST->STRING <list-of-characters>)
  (STRING-COPY  <string>)
  (STRING-FILL! <string> <character>)
  (VECTOR->LIST <vector>)
  (LIST->VECTOR <list>)
  (VECTOR-FILL! <vector> <object>)
  (DELAY <expression>)
  (FORCE <promise>)
  (WITH-INPUT-FROM-FILE <string> <thunk>)
  (WITH-OUTPUT-TO-FILE  <string> <thunk>)
  (CHAR-READY? [<input-port>] )
  (LOAD <string>)
  (TRANSCRIPT-ON <string>)
  (TRANSCRIPT-OFF)

  (DEFINE-SYNTAX <name> <transformer-spec>)     -- High-Level macros (only)
  (LET-SYNTAX    ( <syntax-spec>* ) <exp>+ )
  (LETREC-SYNTAX ( <syntax-spec>* ) <exp>+ )



=== STANDARDS REFERENCES ===


IEEE Standard 1178-1990. "IEEE Standard for the Scheme Programming
Language", IEEE, New York, 1991, ISBN 1-55937-125-0 [1-800-678-IEEE:
order # SH14209].  -- now also an ANSI standard.

W. Clinger and J. Rees, eds., "Revised^4 Report on the Algorithmic
Language Scheme", ACM LISP Pointers IV, 3 (July-September 1991).