The Essentials of Programming Languages language in DrScheme provides a subset of functions and syntactic forms of mzscheme – mostly the ones that correspond to r5rs forms. See below for a complete list. The language is intended for use with the textbook [EoPL].
Defines the datatype id and a function predicate-id that returns #t for instances of the datatype, and #f for any other value.
Each variant-id is defined as a constructor function that creates an instance of the datatype; the constructor takes as many arguments as the variant’s field-ids, and each argument is checked by applying the function produced by the variant’s predicate-expr.
In DrScheme v209 and older, when constructor-based printing was used, variant instances were printed with a make- prefix before the variant name. Thus, for compatibility, in addition to variant-id, make-variant-id is also defined for each variant-id (to the same constructor as variant-id).
Branches on the datatype instance produced by expr, which must be an instance of the specified datatype-id that is defined with define-datatype.
Defined in the textbook’s Appendix B [EoPL]. However, the DrScheme versions are syntactic forms, instead of procedures, and the arguments must be either quoted literal tables or identifiers that are defined (at the top level) to quoted literal tables.
Defined in the EoPL textbook’s Appendix B [EoPL] (and still a function).
As in the book.
As in the book [EoPL].
empty : empty?
The empty list.
Evaluates expr, and prints timing information before returning the result.
(collect-garbage) → void?
Performs a garbage collection (useful for repeatable timings).
For debugging: trace redefines each id at the top level (bound to a procedure) so that it prints arguments on entry and results on exit. The untrace form reverses the action of trace for the given ids.
Tracing a function causes tail-calls in the original function to become non-tail calls.
(provide provide-spec )
Defined only in the top-level namespace (i.e., not in a module); mutate this variable to install an exception-handling thunk. Typically, the handler thunk escapes through a continuation.
The eopl/eopl library sets this variable to #f in the current namespace when it executes.
(install-eopl-exception-handler) → void?
Sets an exception handler to one that checks eopl:error-stop.
The eopl/eopl library calls this function when it executes.
“Essentials of Programming Languages, Third Edition,” MIT Press, 2008. http://www.eopl3.com/