Add 3dup and 3drop

This commit is contained in:
Koichi Nakamura 2021-01-08 04:27:50 +09:00
parent 93e668bad5
commit cdc67b2a5d
2 changed files with 3 additions and 1 deletions

View file

@ -553,7 +553,9 @@ alias-builtin xor ^
: pick cells sp@ + cell + @ ; \ ( wu ... x0 u -- xu ... x0 xu )
: 2drop drop drop ; \ ( a b -- )
: 3drop 2drop drop ; \ ( a b c -- )
: 2dup over over ; \ ( a b -- a b a b )
: 3dup 2 pick 2 pick 2 pick ; \ ( a b c -- a b c a b c )
: 2swap >r -rot r> -rot ; \ ( a b c d -- c d a b )
: 2nip 2swap 2drop ; \ ( a b c d -- c d )
: 2over 3 pick 3 pick ; \ ( a b c d -- a b c d a b )