Add max and min

This commit is contained in:
Koichi Nakamura 2021-01-09 17:20:09 +09:00
parent 5d43fa67ed
commit 0b7363016f

View file

@ -769,6 +769,11 @@ alias-builtin xor ^
repeat
; immediate
\ === Integer Arithmetic (that require control flow words) ===
\ ( a b -- c )
: max 2dup > if drop else nip then ;
: min 2dup < if drop else nip then ;
\ === Multiline Comment ===
: '(' [ key ( ] literal ;