liveBook · Manning

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.

How 3 Manning books explain it

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

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.