a quotation with stack effect ( ... prev elt -- ... next )
Outputs
seq
a mutable sequence
final
the final result
Word description Combines successive elements of the sequence using a binary operation, and outputs the original sequence of intermediate results, together with the final result.
The first element of the new sequence is identity. Then, on the first iteration, the two inputs to the quotation are identity, and the first element of the old sequence. On successive iterations, the first input is the result of the previous iteration, and the second input is the corresponding element of the old sequence.
When given the empty sequence, outputs the same empty sequence together with the identity.
Errors Throws an error if the sequence is immutable, or the sequence cannot hold elements of the type output by quot.