3.19 Continuation Marks: with-continuation-mark (original) (raw)

3.19 Continuation Marks: with-continuation-mark🔗

(with-continuation-mark key-expr val-expr result-expr)

The key-expr, val-expr, and result-exprexpressions are evaluated in order. After key-expr is evaluated to obtain a key and val-expr is evaluated to obtain a value, the key is mapped to the value as a continuation mark in the current continuation’s initial continuation frame. If the frame already has a mark for the key, the mark is replaced. Finally, the result-expr is evaluated; the continuation for evaluating result-expr is the continuation of the with-continuation-mark expression (so the result of the result-expr is the result of thewith-continuation-mark expression, and result-expris in tail position for the with-continuation-markexpression).

+Continuation Marks provides more information on continuation marks.