-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprimitives.txt
47 lines (42 loc) · 2.58 KB
/
primitives.txt
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
Running list of language features not introduced in main text or footnotes
Introduced in main text but not indicated as built-in*
1.1.4 p. 12: square
1.1.6 pp. 18-20: abs, >=
1.1.7 p. 23: sqrt
1.2.4 p. 44: expt, even?
1.2.5 p. 49: gcd
2.2.3 p. 115: filter (accumulate is NOT built-in, yet exercises focus on it)
2.2.3 p. 124: comments by semicolon. omfg wtf, NOW they give us this? i didn't even know they didn't
2.3.1 p. 144: memq
2.4.3 p. 182: magnitude (a built-in which they OVERRODE)
2.4.3 p. 178: hey, real-part, imag-part, and angle are all built-ins too...
3.3.3 p. 268: assoc
3.5.1: cons-stream, stream-car, -cdr, -ref, -map, -null?, -for-each, -filter, -accumulate; delay, force
surprising: stream-accumulate, since accumulate is not built-in!
of all these, only cons-stream and force are special forms
3.5.3 p. 340: stream-append (needs to read entire first argument first)
4.1.1 pp. 365-6: eval and apply (I've used apply in exercises before)
4.3.2 p. 418 FOOTNOTE 48: member ("like memq except that it uses equal? instead of eq?")
4.4.4.7 pp. 485-6: string=?, substring, string-length, string-append,
symbol->string, string->symbol, number->string
footnote 81 DOES mention that these are primitives
5.3.1 p. 534: (vector 1 2 3), say - they introduce (vector-ref) but NOT its constructor!
this also led me to (list-set!).
5.5.2 p. 575 Footnote 36: backquote/quasiquote ` and ,
5.5.4 p. 590 Footnote 42: append can take an arbitrary number of arguments.
*MAYBE their manuscript predates my current MIT Scheme version (9.1) by too much?
First introduced
Exercise 1.22: newline, display, runtime (display and newline formally introduced in 2.1.1)
Exercise 2.18: reverse (not indicated as built-in!)
Exercise 2.20: variable-length argument lists, including for lambdas (come ON)
Exercise 2.23: for-each (not indicated as built-in)
Exercise 2.54: equal?, symbol? (the latter isn't even IN the text explicitly!)
Exercise 2.63: quotient (integer division, returns integer instead of rational)
Exercise 2.80: zero? (not in book, but from my fiddling around)
Exercise 3.12: append!, last-pair (they gave some short simple implementations)
Exercise 3.22: delete! (stumbled on this by myself)
Exercise 4.5: additional syntax for cond clauses, (<test> => <recipient>)
Exercise 4.6: values (stumbled on this by myself; what could it possibly do??)
Exercise 4.7: let* - let with sequential binding. omfg why didn't they introduce this EARLIER!?!? so coding is harder???
Exercise 4.20: letrec - let with simultaneous binding (all bindings available to all values; allows recursion)
ch4-query.scm in (initialize-data-base): list->stream