One-Shot Continuations and dynamic-wind

The current call/cc is an upward, escape-only, non-reentrant one-shot continuation implemented through explicit evaluator signals.

At a glance

LISPEX
(call/cc (lambda (escape) (escape 'done) 'unreachable))

Result

OUTPUT
done

Current guarantees

  • The first invocation atomically consumes the continuation before transfer; every later invocation is E340.
  • dynamic-wind runs before, then thunk, then after; unwind runs pending after thunks innermost first.
  • A new error or escape from an after thunk replaces the signal already in flight.

Boundaries

  • Multi-shot continuation reuse and dynamic-context re-entry are deferred.
  • Host exceptions and host continuations do not implement guest transfer.