► |  | How to Design Programs Languages

1 | Beginning Student
2 | Beginning Student with List Abbreviations
3 | Intermediate Student
4 | Intermediate Student with Lambda
5 | Advanced Student
| Index

▼ | 1 | Beginning Student

1.1 | define
1.2 | define-struct
1.3 | Function Calls
1.4 | Primitive Calls
1.5 | cond
1.6 | if
1.7 | and
1.8 | or
1.9 | Test Cases
1.10 | empty
1.11 | Identifiers
1.12 | Symbols
1.13 | true and false
1.14 | require
1.15 | Primitive Operations

On this page:

#%app

Version: 4.1.4
top← prev up next →

#### 1.3`` Function Calls

(id expr expr ...)

Calls a function. The id must refer to a defined function, and the exprs are evaluated from left to right to produce the values that are passed as arguments to the function. The result of the function call is the result of evaluating the function’s body with every instance of an argument name replaced by the value passed for that argument. The number of argument exprs must be the same as the number of arguments expected by the function.

(#%app id expr expr ...)

A function call can be written with #%app, though it’s practically never written that way.

top← prev up next →