dupn ( n -- quot )
Factor handbook » The language » Combinators » Generalized shuffle words and combinators » Generalized shuffle words

Prev:ndup ( n -- )
Next:npick ( n -- quot )


Vocabulary
generalizations

Inputs
nan integer


Outputs
None

Word description
Calls dup enough times that n references to the element at the top of the stack before dupn is called are on the top of the stack.

Notes
2 dupn is equivalent to dup. 1 dupn is a no-op. 0 dupn is equivalent to drop.

Definition