► |  | Sprachebenen und Material zu Die Macht der Abstraktion

1 | Die Macht der Abstraktion - Anfänger
2 | Die Macht der Abstraktion
3 | Die Macht der Abstraktion mit Zuweisungen
4 | Die Macht der Abstraktion fortgeschritten
5 | Konstruktionsanleitungen 1 bis 10
6 | Bilder konstruieren: "image.ss"
7 | Animationen: "world.ss"
8 | Turtle-Grafik: "turtle.ss"
9 | Abspielen von Audio-Dateien: "sound.ss"
10 | 3D-Liniengraphik: "line3d.ss"
11 | DMd A: Sprachen als Libraries
| Index

▼ | 4 | Die Macht der Abstraktion fortgeschritten

4.1 | Quote-Literal
4.2 | Verträge
4.3 | Primitive Operationen

top← prev up next →

### 4`` Die Macht der Abstraktion fortgeschritten

This is documentation for the language level Die Macht der Abstraktion - fortgeschritten that goes with the German textbook Die Macht der Abstraktion.

program |  | = |  | def-or-expr...
def-or-expr |  | = |  | definition
|  | | |  | expr
|  | | |  | test-case
definition |  | = |  | (define id expr)
|  | | |  | (define-record-procedures id id id (id ...))
|  | | |  | (define-record-procedures-parametric (id id ...) id id (id ...))
|  | | |  | (: id contr)
|  | | |  | (define-record-procedures-2 id id id (field-spec ...))
|  | | |  | (define-record-procedures-parametric-2 id id id id (field-spec ...))
field-spec |  | = |  | id
|  | | |  | (id id)
quoted |  | = |  | id
|  | | |  | number
|  | | |  | string
|  | | |  | character
|  | | |  | (quoted ...)
|  | | |  | ’quoted
expr |  | = |  | (expr expr ...) ; Prozedurapplikation
|  | | |  | #t
|  | | |  | #f
|  | | |  | number
|  | | |  | string
|  | | |  | (lambda (id ...) expr)
|  | | |  | id ; Bezeichner
|  | | |  | (cond (expr expr) (expr expr) ...)
|  | | |  | (cond (expr expr) ... (else expr))
|  | | |  | (if expr expr)
|  | | |  | (and expr ...)
|  | | |  | (or expr ...)
|  | | |  | (let ((id expr) ...) expr)
|  | | |  | (letrec ((id expr) ...) expr)
|  | | |  | (let* ((id expr) ...) expr)
|  | | |  | (begin expr expr ...)
|  | | |  | (contract contr)
|  | | |  | (for-all ((id contr) ...) expr)
|  | | |  | (==> expr expr)
|  | | |  | (set! id expr)
|  | | |  | ’quoted ; Quote-Literal
contr |  | = |  | id
|  | | |  | (predicate expr)
|  | | |  | (one-of expr ...)
|  | | |  | (mixed contr ...)
|  | | |  | (contr ... -> contr) ; Prozedur-Vertrag
|  | | |  | (list contr)
|  | | |  | %a %b %c ; Vertrags-Variable
|  | | |  | (combined contr ...)
|  | | |  | contract
test-case |  | = |  | (check-expect expr expr)
|  | | |  | (check-within expr expr expr)
|  | | |  | (check-member-of expr expr ...)
|  | | |  | (check-range expr expr expr)
|  | | |  | (check-error expr expr)
|  | | |  | (check-property expr)

Ein id ist eine Folge von Zeichen, die weder Leerzeichen noch eins der folgenden Zeichen enthält:
" , ' ` ( ) [ ] { } | ; #
Ein number ist eine Zahl wie z.B. 123, 3/2 oder 5.5.
Ein string ist eine Zeichenkette, und durch ein Paar von " umschlossen. So sind z.B. "abcdef", "This is a string" und "Dies ist eine Zeichenkette, die \" enthält." Zeichenketten.

Zahlen
* : (number number number ... -> number)
+ : (number number number ... -> number)
- : (number number ... -> number)
/ : (number number number ... -> number)
< : (real real real ... -> boolean)
<= : (real real real ... -> boolean)
= : (number number number ... -> boolean)
> : (real real real ... -> boolean)
>= : (real real real ... -> boolean)
abs : (real -> real)
acos : (number -> number)
angle : (number -> real)
asin : (number -> number)
atan : (number -> number)
ceiling : (real -> integer)
complex? : (%a -> boolean)
cos : (number -> number)
current-seconds : (-> natural)
denominator : (rational -> natural)
even? : (integer -> boolean)
exact->inexact : (number -> number)
exact? : (number -> boolean)
exp : (number -> number)
expt : (number number -> number)
floor : (real -> integer)
gcd : (natural natural ... -> natural)
imag-part : (number -> real)
inexact->exact : (number -> number)
inexact? : (number -> boolean)
integer? : (%a -> boolean)
lcm : (natural natural ... -> natural)
log : (number -> number)
magnitude : (number -> real)
make-polar : (real real -> number)
max : (real real ... -> real)
min : (real real ... -> real)
modulo : (integer integer -> integer)
natural? : (%a -> boolean)
negative? : (number -> boolean)
number->string : (number -> string)
number? : (%a -> boolean)
numerator : (rational -> integer)
odd? : (integer -> boolean)
positive? : (number -> boolean)
quotient : (integer integer -> integer)
random : (natural -> natural)
rational? : (%a -> boolean)
real-part : (number -> real)
real? : (%a -> boolean)
remainder : (integer integer -> integer)
round : (real -> integer)
sin : (number -> number)
sqrt : (number -> number)
string->number : (string -> (mixed number (one-of #f)))
tan : (number -> number)
zero? : (number -> boolean)
boolesche Werte
boolean=? : (boolean boolean -> boolean)
boolean? : (%a -> boolean)
false? : (%a -> boolean)
not : (boolean -> boolean)
true? : (%a -> boolean)
Listen
append : ((list %a) ... -> (list %a))
empty : list
empty? : (%a -> boolean)
first : ((list %a) -> %a)

fold :

((%b (%a %b -> %b) (list %a) -> %b)
"Liste einfalten.")

length : ((list %a) -> natural)
list : (%a ... -> (list %a))
list-ref : ((list %a) natural -> %a)
make-pair : (%a (list %a) -> (list %a))
pair? : (%a -> boolean)
rest : ((list %a) -> (list %a))
reverse : ((list %a) -> (list %a))
Schokokekse
chocolate-cookie-chocolate : (chocolate-cookie -> number)
chocolate-cookie-cookie : (chocolate-cookie -> number)
chocolate-cookie? : (%a -> boolean)
make-chocolate-cookie : (number number -> chocolate-cookie)
Zeichenketten
string->strings-list : (string -> (list string))
string-append : (string string ... -> string)
string-length : (string -> natural)
string<=? : (string string string ... -> boolean)
string<? : (string string string ... -> boolean)
string=? : (string string string ... -> boolean)
string>=? : (string string string ... -> boolean)
string>? : (string string string ... -> boolean)
string? : (%a -> boolean)
strings-list->string : ((list string) -> string)
Symbole
string->symbol : (string -> symbol)
symbol->string : (symbol -> string)
symbol? : (%a -> boolean)
Verschiedenes
apply : (procedure (list %a) -> %b)
eq? : (%a %b -> boolean)
equal? : (%a %b -> boolean)
for-each : ((%a -> %b) (list %a) -> unspecific)
map : ((%a -> %b) (list %a) -> (list %b))
violation : (string -> unspecific)
write-newline : (-> unspecific)
write-string : (string -> unspecific)

top← prev up next →