==== DUPN ====
----
----
Duplicate a group of N objects on the stack
----
^ __Input Stack__ ^^^^^^ ^ __Output Stack__ ^^^^^
| **On** | **On-1** | **...** | **O2** | **O1** | **In** | **→** | **On** | **On-1** | **...** | **O2** | **O1** |
| //Level n+1// | //Level n// | //...// | //Level 3// | //Level 2// | //Level 1// | //→// | //Level 2n// | //Level 2n-1// | //...// | //Level 2// | //Level 1// |
{{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}}
|**Type**| [[manual:chapter5:basics#commands|Command]] ||
|**Parallel list processing**| [[manual:chapter5:listproc#group-2commands-that-must-use-dolist-to-parallel-process|Group 2]] ||
|**Affected by flags**| None ||
----
The ''DUPN'' command creates duplicates of objects from level 2 to level N+1 of the stack.
----
This command is fully compatible with userRPL.
----
5: ∡60°
4: "This is a string"
3: { 'X' 'Y' 'Z' }
2: 1_m
1: 3
……………………………………………………………………………………
DUPN
will result in
7: ∡60°
6: "This is a string"
5: { 'X' 'Y' 'Z' }
4: 1_m
3: "This is a string"
2: { 'X' 'Y' 'Z' }
1: 1_m
……………………………………………………………………………………
----
{{page>manual:chapter6:stack&nofooter&noeditbtn&inline}}