PLT-Scheme

In 2010, the PLT Scheme project was renamed Racket.

For more information on Racket, see

http://www.racket-lang.org/

The remainder of this page exists for historical purposes only.

* *

Multi-platform, nearly R5RS-compliant Scheme implementation with a compiler, graphical toolbox, development environment, threads, exceptions, object system, and more.

PLT Scheme is an umbrella name for a family of implementations of the Scheme programming language. MzScheme is the lightweight, embeddable, scripting-friendly PLT Scheme implementation.

http://www.plt-scheme.org/

Up-to-date documentation is found at

http://download.plt-scheme.org/doc/

The following sections are based upon an *old* version of the PLT MzScheme Manual.

Check the DrScheme HelpDesk for an up-to-date version of the following list:

Implementing SRFIs: SRFI-1 SRFI-2 SRFI-4 SRFI-5 SRFI-6 SRFI-7 SRFI-8 SRFI-9 SRFI-11 SRFI-13 SRFI-14 SRFI-16 SRFI-17 SRFI-19 SRFI-23 SRFI-25 SRFI-26 SRFI-27 SRFI-28 SRFI-29 SRFI-30 SRFI-31 SRFI-34 SRFI-35 SRFI-38 SRFI-39 SRFI-40 SRFI-41 SRFI-42 SRFI-43 SRFI-45 SRFI-48 SRFI-54 SRFI-57 SRFI-59 SRFI-60 SRFI-61 SRFI-62 SRFI-63 SRFI-64 SRFI-66 SRFI-67 SRFI-69 SRFI-71 SRFI-74 SRFI-78 SRFI-86 SRFI-87 SRFI-98

Evaluation Order

Arguments in an application are evaluated left-to-right.

Basic Syntax Extensions

when, unless, begin0, define-values, let-values, let*-values, letrec-values, set!-values, fluid-let, case-lambda

The last test expression in an and or a or can return multiple values.

The quote form never allocates, so the results of multiple evaluations of a single quote expression are always eq?.

Define? supports the MIT-generalization.

An "empty application" from () expands to the quoted list '().

Basic Data Extensions - Void and Undefined

void, void?

Basic Data Extensions - Booleans

andmap, ormap

Basic Data Extensions - Numbers

add1, sub1,

quotient/remainder, integer-sqrt, integer-sqrt/remainder?,

bitwise-ior, bitwise-and, bitwise-xor, bitwise-not, arithmetic-shift, random,

random-seed, pseudo-random-generator->vector?, vector->pseudo-random-generator?, current-pseudo-random-generator, make-pseudo-random-generator, pseudo-random-generator?

integer-bytes->integer?, integer->integer-bytes?, system-big-endian??, floating-point-bytes->real?, real->floating-point-bytes?

Basic Data Extensions - Characters

char=?, char<?, ...

char-alphabetic?, char-lower-case?, char-upper-case?, char-title-case??, char-numeric?, char-symbolic?, char-punctuation?, char-graphic??, char-whitespace?, char-blank??, char-iso-control?.

char-upcase, char-downcase, char-titlecase. make-known-char-list?, char-utf-8-length?.

Basic Data Extensions - Strings

string-copy!

string=?, string<?, etc. all take two or more string arguments.

string-locale=??, string-locale<??, string-locale->??, string-locale-ci=??, string-locale-ci<??, string-locale>??

Basic Data Extensions - Byte strings

A byte string is like a string, but is a sequence of bytes and not characters.

bytes??, bytes?, make-bytes?, bytes-length?, bytes-ref?, bytes-set!?, bytes-fill!?, subbytes?, bytes-append?, bytes-copy?, bytes-copy!?, bytes->list?, list->bytes?, bytes->immutable-bytes?, bytes=??, bytes<??, bytes>??

bytes->string/utf8?, bytes->string/locale?, bytes->string/latin1?, string->bytes/utf-8?, string->bytes/locale?, string->bytes/latin-1?, string-utf-8-length?, bytes-utf-8-length?, bytes-utf-8-ref?, bytes-utf-8-index?

bytes-open-converter?, bytes-close-converter?, bytes-convert?, bytes-convert-end?, bytes-converter??, locale-string-encoding?

Basic Data Extensions - Symbols

string->uninterned-symbol, gensym

Basic Data Extensions - Vectors

vector->immutable-vector?, vector-immutable?

Basic Data Extensions - Lists

null, reverse!, append!, list*, cons-immutable?, list-immutable?, list*-immutable?, immutable??.

Basic Data Extensions - Boxes

box, box-immutable?, unbox, set-box!, box?, #&

Basic Data Extensions - Procedures

procedure-arity?, procedure-arity-includes?, arity-at-least-value

primitive?, primitive-name, primitive-result-arity, primitive-closure?, simple-return-primitive?,

Basic Data Extensions - Promises

promise?

Basic Data Extensions - Hash Tables

make-hash-table, make-immutable-hash-table?, hash-table?, hash-table-put!, hash-table-get, hash-table-remove!, hash-table-map, hash-table-for-each, hash-table-count, hash-table-copy, eq-hash-code?, equal-hash-code?

      • THE FOLLOWING SECTIONS HAVEN'T BEEN UPDATED SINCE v103 FROM 2000 ---

Structures

struct?, define-struct, let-struct, struct?, struct-length?, struct-ref, struct->vector?, struct-type?, struct-constructor-procedure??, struct-predicate-procedure??, struct-getter-procedure??, struct-setter-procedure??

Classes and objects

interface?, class*/names?, class*?, class?, meta-object?, ivar?, ivar/proc?, send?, make-generic/proc?, make-generic?, object??, class??, interface??, class->interface?, object-interface?, is-a?, subclass??, implementation??, interface-extension??, ivar-in-interface??, interface->ivar-names?, class-initialization-arity?

Units

unit, invoke-unit?, compound-unit?, unit??, unit/sig?, define-signature?, let-signature?, compound-unit/sig?, invoke-unit/sig?, unit/sig->unit?, unit->unit/sig?, verify-signature-match?, verify-linkage-signature-match?

Exceptions and control flow

raise, current-exception-handler, with-handlers, error, raise-type-error?, raise-mismatch-error?, raise-syntax-error?, inferred-name?, let/cc, call-with-escape-continuation?, call/ec?, let/ec?, with-continuation-mark?, current-continuation-marks?, continuation-mark-set->list?, continuation-mark-set??, error-escape-handler?

Threads and namespaces

thread, current-thread, thread?, sleep, thread-running?, thread-wait, kill-thread, break-thread, call-in-nested-thread?,

make-semaphore?, semaphore??, semaphore-post?, semaphore-wait?, semaphore-try-wait??, semaphore-wait/enable-break?,

make-namespace?, namespace??, defined?, undefine?, global-defined-value?, make-global-value-list?, built-in-name?, #%?, keyword-name?, keyword-name??

current-directory, current-input-port, current-output-port, current-error-port, global-port-print-handler?, read-case-sensitive, read-square-bracket-as-paren?, read-curly-brace-as-paren?, read-accept-box?, read-accespt-compiled?, read-accept-bar-quote?, read-accept-graph?, read-decimal-as-inexact?, print-graph, print-struct?, print-box?, print-vector-length, compile-allow-cond-fallthrough?, compile-allow-set!-undefined?, current-prompt-read?, current-eval, current-namespace?, current-print?, current-load?, current-load-extension?, current-load-relative-directory?, use-compiled-file-kinds?, current-library-collection-paths?, current-require-relative-collection?, current-exception-handler, error-escape-handler?, error-display-handler?, error-print-width?, error-value->string-handler?, break-enabled?, current-custodian?, exit-handler, current-pseudo-random-generator

make-parameter, parameter?, parameter-procedure=??, parameterize, check-parameter-procedure?

make-custodian?, custodian-shutdown-all?, custodian??

Regular Expression

regexp?, pregexp?, regexp?, pregexp??, byte-regexp?, byte-pregexp?, byte-regexp??, byte-pregexp??, regexp-match, regexp-match-positions, regexp-match??, regexp-match-peek?, regexp-match-peek-positions?, regexp-match-peek-immediate?, regexp-match-peek-positions-immediate?, regexp-replace, regexp-replace*?

System Utilities

eof?, port?, open-input-file, open-output-file, call-with-input-file, call-with-output-file, with-input-from-file, with-output-from-file?, make-pipe?, open-input-string, open-output-string, get-output-string, file-stream-port??, flush-output, file-position, make-input-port, make-output-port, read-line, read-string, read-string-avail!?, read-string-avail!/enable-break?, print, write-string-avail?, write-string-avail/enable-break?, fprintf, printf, format, port-read-handler?, port-display-handler?, port-write-handler?, port-print-handler?

build-path, absolute-path?, relative-path?, complete-path?, path->complete-path, resolve-path, expand-path, simplify-path, normal-case-path, split-path, find-executable-path, find-system-path, path-list-string->path-list, file-exists?, link-exists?, delete-file, rename-file-or-directory, file-or-directory-modify-seconds, file-or-directory-permissions, file-size, copy-file, current-directory, current-drive, directory-exists?, make-directory, delete-directory, directory-list, filesystem-root-list

tcp-listen?, tcp-connect?, tcp-accept?, tcp-accept-ready??, tcp-close?, tcp-listener??, tcp-addresses?

current-seconds, seconds->date, current-milliseconds, current-process-milliseconds?, current-gc-milliseconds?, time-apply?, time

system, system*?, execute?, execute*?, process, process*?, process/ports?, process*/ports?, send-event?

getenv, putenv

system-type?, system-library-subpath?, version, banner?

Memory Management

make-weak-box?, weak-box-value?, weak-box??, make-will-executor?, will-executor??, will-register?, will-execute?, will-try-execute?, collect-garbage?, current-memory-use?, dump-memory-stats?

Macros

define-macro, let-macro, macro?, define-id-macro, let-id-macro, id-macro??, define-expansion-time?, let-expansion-time?, local-expansion-time-value?, global-expansion-time-value?, local-expansion-time-bound??, expansion-time-value??, begin-elaboration-time?, syntax??, expand-defmacro?, expand-defmacro-once?, local-expand-defmacro?, local-expand-body-expression?

Support facilities

eval, load-relative?, load/use-compiled?, load/cd?, read-eval-print-loop, exit

#`, #|, |#, #!, #0=, #0#

compile, load-extension?, write-image-to-file?, read-image-from-file?

Library collections and MzLib

require-library?

awk?

class/d?, class/d*?, class/d*/names?,

command-line, parse-command-line?

compile-file

date->string, date-display-format?, find-seconds?, date->julian/scalinger?, julian/scalinger->string?