3map-as ( ... seq1 seq2 seq3 quot: ( ... elt1 elt2 elt3 -- ... newelt ) exemplar -- ... newseq )
Factor handbook > The language > Collections > Sequence operations > Sequence combinators > Triple-wise sequence combinators

Prev:3map ( ... seq1 seq2 seq3 quot: ( ... elt1 elt2 elt3 -- ... newelt ) -- ... newseq )


Vocabulary
sequences

Inputs and outputs
seq1a sequence
seq2a sequence
seq3a sequence
quota quotation with stack effect ( ... elt1 elt2 elt3 -- ... newelt )
exemplara sequence
newseqa new sequence


Word description
Applies the quotation to each triple of elements in turn, yielding new elements which are collected into a new sequence having the same class as exemplar.

Definition


: 3map-as
( ... seq1 seq2 seq3 quot: ( ... elt1 elt2 elt3 -- ... newelt ) exemplar -- ... newseq )
[ (3each) ] dip map-integers ; inline