1 Welcome to PLT Scheme
2 Scheme Essentials
3 Built-In Datatypes
4 Expressions and Definitions
5 Programmer-Defined Datatypes
6 Modules
7 Contracts
8 Input and Output
9 Regular Expressions
10 Exceptions and Control
11 Iterations and Comprehensions
12 Pattern Matching
13 Classes and Objects
14 Units (Components)
15 Reflection and Dynamic Evaluation
16 Macros
17 Performance
18 Running and Creating Executables
19 Compilation and Configuration
20 More Libraries
Bibliography
Index
Version: 4.0.2

 

6 Modules

Scheme definitions and expressions are normally written inside of a module. Although a REPL evaluates definitions and expressions outside of a module for exploration and debugging purposes, and although load can evaluate definitions and expressions from a file as if they appeared in a REPL interaction, code that is meant to last for more than a few seconds belongs in a module.

    6.1 Module Basics

    6.2 Module Syntax

      6.2.1 The module Form

      6.2.2 The #lang Shorthand

    6.3 Module Paths

    6.4 Imports: require

    6.5 Exports: provide

    6.6 Assignment and Redefinition