These are among the most useful primitives in MzScheme, the Scheme dialect of Dr. Scheme. Some of these primitives have different names in other dialects. By convention, symbols ending in "?" are predicate names and symbols containing "->" refer to type conversion operations. Those ending in "!" refer to destructive operations (mutators). Symbols that are italicized require loading a library before using them.
| NUMBERS | |||||||
|---|---|---|---|---|---|---|---|
| + | - | * | / | quotient | remainder | modulo | |
| abs | max | min | floor | truncate | ceiling | round | |
| number? | complex? | real? | integer? | rational? | exact? | inexact? | |
| = | < | > | <= | >= | numerator | denominator | |
| add1 | sub1 | zero? | positive? | negative? | odd? | even? | |
| sqrt | exp | log | expt | gcd | lcm | random | |
| BOOLEANS AND EQUIVALENCE PREDICATES | |||||||
| #t | #f | not | eq? | equal? | eqv? | and | or |
| SEQUENCING, CONTROL, AND BINDING | |||||||
| define | if | cond | eval | quote | begin | begin0 | |
| lambda | let | do | when | unless | case | ||
| let* | letrec | set! | define-macro | force | delay | ||
| PAIRS AND LISTS | |||||||
| car | cdr | cons | c..r | null? | pair? | list? | |
| list | append | reverse | length | list-ref | list-tail | last-pair | |
| member | memq | memv | assoc | assq | assv | ||
| set-car! | set-cdr! | append! | reverse! | ||||
| INPUT, OUTPUT, AND PORTS | |||||||
| open-input-file | close-input-port | open-output-file | close-output-port | ||||
| read | read-char | read-line | eof-object? | load | |||
| write | write-char | newline | display | pretty-print | |||
| PROCEDURES | |||||||
| apply | map | for-each | procedure? | ||||
| CHARACTERS | |||||||
| char? | char-upcase | char-downcase | char->integer | integer->char | |||
| char-alphabetic? | char-numeric? | char-whitespace? | char-upper-case? | char-lower-case? | |||
| char=? | char<? | char>? | char<=? | char>=? | |||
| char-ci=? | char-ci<? | char-ci>? | char-ci<=? | char-ci>=? | |||
| SYMBOLS AND STRINGS | |||||||
| symbol? | gensym | symbol->string | string->symbol | putprop | getprop | ||
| string? | string | make-string | string-length | string-append | string-ref | substring | |
| string=? | string<? | string>? | string<=? | string>=? | |||
| string-ci=? | string-ci<? | string-ci>? | string-ci<=? | string-ci>=? | |||
| list->string | string->list | number->string | string->number | string-set! | string-copy | string-fill! | |
| VECTORS | |||||||
| vector? | vector | make-vector | list->vector | vector->list | vector-length | vector-ref | |
| vector-set! | vector-fill! | ||||||
| MISCELLANEOUS | |||||||
| define-struct | exit | error | system | require | trace | untrace | |