► |  | 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

▼ | 5 | Advanced Student

5.1 | define
5.2 | define-struct
5.3 | lambda
5.4 | Function Calls
5.5 | begin
5.6 | begin0
5.7 | set!
5.8 | delay
5.9 | shared
5.10 | let
5.11 | recur
5.12 | case
5.13 | when and unless
5.14 | Primitive Operations
5.15 | Unchanged Forms

On this page:

recur

top ← prev up next →

#### 5.11`` recur

( recur id ([id expr] ...) expr)

A short-hand recursion construct. The first id corresponds to the name of the recursive function. The parenthesized ids are the function’s arguments, and each corresponding expr is a value supplied for that argument in an initial starting call of the function. The last expr is the body of the function.

More precisely, a recur form

( recur func-id ([arg-id arg-expr] ...)
body-expr)

is equivalent to

(( local [( define (func-id arg-id ...)
body-expr)]
func-id)
arg-expr ...)

top ← prev up next →