with-datastack ( stack quot -- new-stack )
Factor handbook » The language » Stack effect checking » Stack effect checking escape hatches


Vocabulary
continuations

Inputs
stacka sequence
quota quotation


Outputs
new-stacka sequence


Word description
Executes the quotation with the given data stack contents, and outputs the new data stack after the word returns. The input sequence is not modified; a new sequence is produced. Does not affect the data stack in surrounding code, other than consuming the two inputs and pushing the output.

Examples
USING: continuations math prettyprint ; { 3 7 } [ + ] with-datastack .
{ 10 }


Definition