nmap ( seq... quot n -- result ) - Factor Documentation

nmap ( seq... quot n -- result )
Generalized sequence words



Vocabulary
sequences .generalizations

Inputs
seq... n sequences on the datastack
quot a quotation with stack effect ( element... -- result )
n an integer


Outputs
result a sequence of the same type as the first seq


Word description
A generalization of map , 2map , and 3map that can map over any number of sequences in parallel.

Definition
USING: generalizations kernel ;

IN: sequences.generalizations

: nmap ( seq... quot n -- result )
dup [ npick ] curry [ dip swap ] curry dip nmap-as ; inline

AltStyle によって変換されたページ (->オリジナル) /