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 →

 

4 Expressions and Definitions

The Scheme Essentials chapter introduced some of Scheme’s syntactic forms: definitions, procedure applications, conditionals, and so on. This section provides more details on those forms, plus a few additional basic forms.

    4.1 Notation

    4.2 Identifiers and Binding

    4.3 Function Calls (Procedure Applications)

      4.3.1 Evaluation Order and Arity

      4.3.2 Keyword Arguments

      4.3.3 The apply Function

    4.4 Functions (Procedures): lambda

      4.4.1 Declaring a Rest Argument

      4.4.2 Declaring Optional Arguments

      4.4.3 Declaring Keyword Arguments

      4.4.4 Arity-Sensitive Functions: case-lambda

    4.5 Definitions: define

      4.5.1 Function Shorthand

      4.5.2 Curried Function Shorthand

      4.5.3 Multiple Values and define-values

      4.5.4 Internal Definitions

    4.6 Local Binding

      4.6.1 Parallel Binding: let

      4.6.2 Sequential Binding: let*

      4.6.3 Recursive Binding: letrec

      4.6.4 Named let

      4.6.5 Multiple Values: let-values, let*-values, letrec-values

    4.7 Conditionals

      4.7.1 Simple Branching: if

      4.7.2 Combining Tests: and and or

      4.7.3 Chaining Tests: cond

    4.8 Sequencing

      4.8.1 Effects Before: begin

      4.8.2 Effects After: begin0

      4.8.3 Effects If...: when and unless

    4.9 Assignment: set!

      4.9.1 Guidelines for Using Assignment

      4.9.2 Multiple Values: set!-values

    4.10 Quoting: quote and

 

contents

 index

← prev  up  next →