SRFI 226: Control Features

by Marc Nieper-Wi├čkirchen

status: draft (2021-08-06)

keywords: Continuations, Control Flow

See also SRFI 18: Multithreading support, SRFI 34: Exception Handling for Programs, SRFI 39: Parameter objects, SRFI 45: Primitives for Expressing Iterative Lazy Algorithms, SRFI 97: SRFI Libraries, SRFI 154: First-class dynamic extents, SRFI 155: Promises, SRFI 157: Continuation marks, and SRFI 158: Generators and Accumulators.


This SRFI defines a rich set of control operators for the Scheme programming language, including the venerable call/cc (call-with-current-continuation). The set of operators was highly influenced by the control operators provided by Racket.

Continuations can be delimited by continuation prompts, and all continuations become delimited continuations, at the latest by the default prompt at the start of each thread. Moreover, continuations are divided into composable and non-composable continuations, which can be captured and reinstated.

To investigate continuations, this SRFI supports continuation marks and offers operators to set and retrieve them.

Moreover, this SRFI defines clear semantics of exceptions, parameter objects, promises, and threads consistent with the other concepts defined here.