Advanced Scheme: Some Naughty Bits

In 2003 and 2004, I ran two-night seminars, under the aegis of the MIT SIPB , introducing features of Scheme that aren't usually covered in undergraduate classes such as MIT's 6.001. The first night covered hygienic macros , and the second continuations. Hygienic macros are an elegant mechanism for developing new syntax. Continuations are a powerful control-flow construct from which nearly any other control-flow structure, including exceptions, co-routines, threads, and backtracking may be derived. Macros are introduced in the first set of slides, followed by continuations in the second. Both are used in the second set to implement a variety of control-flow constructs on top of scheme, culminating with implementations of cooperative multi-threading, and nondeterministic Prolog-esque programming mechanisms.

Slides

These slides are slightly error-corrected from their presentation in the classes; please let me know if you find more errors. Corresponding source code (from '03):

Selected Resources

General Scheme Resources

R5RS Hygienic Macros

Continuations

Non-deterministic programming in Scheme


Jeremy H. Brown < jhbrown@csail.mit.edu >