1 Welcome to PLT Scheme
2 Scheme Essentials
3 Built-In Datatypes
4 Expressions and Definitions
5 Programmer-Defined Datatypes
6 Modules
7 Input and Output
8 Contracts
9 Classes and Objects
10 Exceptions and Control
11 Iterations and Comprehensions
12 Regular-Expression Matching (Regexps)
13 Pattern Matching
14 Quasiquoting
15 Units (Higher-Order Modules)
16 Threads
17 Syntactic Extension (Macros)
18 Reflection and Dynamic Evaluation
19 Reader Extension
20 Security
21 Memory Management
22 Performance
23 Foreign-Function Interface (FFI)
24 Scripts
25 Graphical User Interfaces (GUIs)
26 More Tools
Index

contents

 index

← prev  up  next →

 

2 Scheme Essentials

This chapter provides a quick introduction to Scheme as background for the rest of the guide. Readers with some Scheme experience can safely skip to (part "datatypes").

    2.1 Simple Values

    2.2 Simple Definitions and Expressions

      2.2.1 Definitions

      2.2.2 An Aside on Indenting Code

      2.2.3 Identifiers

      2.2.4 Function Calls (Procedure Applications)

      2.2.5 Conditionals with if, and, or, and cond

      2.2.6 Function Calls, Again

      2.2.7 Anonymous Functions with lambda

      2.2.8 Local Binding with define, let, and let*

    2.3 Lists, Iteration, and Recursion

      2.3.1 Predefined List Loops

      2.3.2 List Iteration from Scratch

      2.3.3 Tail Recursion

      2.3.4 Recursion versus Iteration

    2.4 Pairs, Lists, and Scheme Syntax

      2.4.1 Quoting Pairs and Symbols with quote

      2.4.2 Abbreviating quote with

      2.4.3 Lists and Scheme Syntax

 

contents

 index

← prev  up  next →