Continuation
A continuation is a representation of the remaining computation that can proceed after an operation produces a result or reaches a specified program point.
Functional Design and Architecture: Examples in Haskell
A continuation is a function representing the remainder of a computation and receiving the result of an intermediate operation.
- How it is used
- Connects result-producing eDSL actions into dependent, sequential scripts that cannot omit required prior setup.
- How deep it goes
- Explains continuation fields, bind-based nesting, Functor composition, and interpreter unrolling through typed eDSL implementations.
- Examples
- Uses controller setup and sensor reporting, sandwich construction, and terminal read-and-print scenarios.
- What you can do after
- Build it from scratch by adding typed continuation fields and interpreting each produced next script until termination.
Read how Functional Design and Architecture: Examples in Haskell explains continuation →
C++ Concurrency in Action, Second Edition
A continuation is a function scheduled to run automatically after an asynchronous computation reaches a specified completion point.
- How it is used
- Schedules result processing when a future becomes ready, avoiding an explicit wait for each stage.
- How deep it goes
- Works through `then()` ownership, arguments, chaining and execution-thread uncertainty, then identifies the limit posed by blocking backend calls.
- Examples
- Uses future-validity checks, a chained login workflow, and gathering results from multiple futures.
- What you can do after
- Apply it via `std::experimental::future::then()` to chain asynchronous operations and handle their results or exceptions.
Read how C++ Concurrency in Action, Second Edition explains continuation →
Functional Programming in Scala, Second Edition
A continuation is a representation of the computation that should proceed after an asynchronous result becomes available.
- How it is used
- Represents deferred control flow after synchronous or asynchronous computations produce results.
- How deep it goes
- Explains continuations as stored functions, interpreter steps, callback interfaces, and compositional wrappers.
- Examples
- Uses IO constructors, repeated printLine actions, asynchronous byte reads, and callback-wrapped Future values.
- What you can do after
- Apply it via IO, Future, and Par to represent and compose computations that resume after results arrive.
Read how Functional Programming in Scala, Second Edition explains continuation →
Related concepts
- futureused by · A future is an abstraction representing an asynchronous computation or its result, which may not be complete or available yet.
- then()used by · `then()` is a C++ Concurrency TS future operation that attaches a continuation to run after the future becomes ready.
- std::shared_futureused by · A C++ standard library class template that allows multiple objects to access the same asynchronous result.
- free monadused by · A free monad represents computations as composable syntax over an operation set, with interpretation and execution supplied separately.
- TaskCompletionSource<T>configured by · TaskCompletionSource<T> is a generic .NET class that provides a Task<T> whose completion and result can be controlled explicitly by application code.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


