Contents

I  Core Scheme

    1  DrScheme Mechanics
        1.1  DrScheme: The Interactions Window
        1.2  DrScheme: The Definitions Window

    2  Scheme's Grammar: Expressions and Definitions

    3  Simple Data, Simple Functions
        3.1  Numbers, Booleans, Symbols, Characters
        3.2  Strings
        3.3  Vectors
        3.4  Structures
        3.5  Our First Program

    4  Lists and Recursive Functions
        4.1  Little Lists
        4.2  Big Lists
        4.3  Lists and Recursion
        4.4  Our First Program with Lists

    5  Loops and Functions
        5.1  Some Simple Examples
        5.2  Anonymous Functions
        5.3  Many Loops for Lists
        5.4  Our First Program with Loops
        5.5  Looping over Time and other Events

    6  S-expressions
        6.1  Quote, Backquote, Comma
        6.2  S-expressions and Recursion

    7  Types and Predicates

    8  Assignment
        8.1  Variable Assignment
        8.2  Our First Program with Effects
        8.3  Structural Mutation
        8.4  Our First Program with Structure Mutation

    9  Blocks
        9.1  Local Definitions
        9.2  Scope, Extent, and Garbage Collection
        9.3  Variations on a theme
        9.4  Named Blocks -- Making loops on the fly

    10  Some More Recursion
        10.1  Accumulators
        10.2  Generative Recursion

    11  Core Scheme is Not Enough

II  Advanced Core Scheme

    1  More on Strings

    2  More on Lambda
        2.1  Defining Loops

    3  Multiple Values

    4  Hash Tables

    5  Exceptions

    6  Continuations

    7  Syntactic Extensions

III  Input and Output

    1  Input and Output: The Scheme Way
        1.1  Input and Output via External S-expressions
        1.2  External S-expressions and Files
        1.3  Pretty Printing

    2  Input and Output: Plain Text
        2.1  Reading Lines
        2.2  Reading Comma-Separated Values
        2.3  Writing Plain Text
        2.4  Character for Character

    3  Input and Output: The XML Way

    4  Reading and Writing Binary Data

    5  Ports
        5.1  Files and Ports
        5.2  Strings and Ports
        5.3  Networks and Ports
        5.4  Creating Your Own Ports