Chapter 4. Flow of Control

All forward control flow in RScheme is based on the if special form. This form interprets all values which are not the #f object as indicating true. Hence:

(if #t 2 3) 2

(if #f 2 3) 3

(if 1 2 3) 2

In addition, RScheme implements the standard Scheme cond, case[1], named let, and do.

RScheme also supports exceptions for backward control flow. See in particular handler-case and signal in the chapter on exception handling.

Notes

[1]

Although our case uses eq? tests instead of eqv?. It works out the same except on floating-point discriminants.