Skip to main content
A signal terminates exactly once by succeeding with a value, failing, or closing without a value. These states are mutually exclusive.

outcome()

outcome(signal) converts every terminal state into an ordinary tagged value:
The returned signal always succeeds after the source terminates.

succeeded()

succeeded(signal) emits whether the source succeeded after it terminates.

failed()

failed(signal) emits whether the source failed after it terminates.

closed()

closed(signal) emits whether the source closed without a value after it terminates. Failure is not closure.

onSuccess()

onSuccess(signal) emits the successful source value and closes for failure or closure. Unlike consuming the source directly, it suppresses failure. It preserves a keyed or global source partition.

onFailure()

onFailure(signal) emits { name, message } when the source fails and closes for success or closure.

onClose()

onClose(signal) emits null when the source closes and closes for success or failure. Use routing and scopes to declare recovery work under a selective outcome. Use fallback when closure should advance to another value but failure should remain selected.