OVER

Copies the second topmost item to the top of the stack

Input stack: a b

Output stack: a b a

PumpkinDB> 0x10 0x20 OVER
0x10 0x20 0x10

Allocation

None

Errors

EmptyStack error if there are less than two items on the stack

Tests

works : 1 2 OVER 3 WRAP [1 2 1] EQUAL?.
requires_two_items_0 : [OVER] TRY UNWRAP 0x04 EQUAL?.
requires_two_items_1 : [1 OVER] TRY UNWRAP 0x04 EQUAL?.

results matching ""

    No results matching ""