pub unsafe fn pick(stack: Stack, n: usize) -> StackExpand description
Pick: Copy the nth value to the top (0-indexed from top) ( … xn … x1 x0 n – … xn … x1 x0 xn )
Examples:
- pick(0) is equivalent to dup
- pick(1) is equivalent to over
- pick(2) copies the third value to the top
§Safety
Stack must have at least n+1 values