14 lines
182 B
Forth
14 lines
182 B
Forth
|
: min1
|
||
|
2dup 2dup > rot rot < rot swap or rot rot or and ;
|
||
|
|
||
|
: min2
|
||
|
2dup > 1+ roll nip ;
|
||
|
\ ... or is it "<"?
|
||
|
|
||
|
: gcd
|
||
|
2dup < if swap then
|
||
|
begin
|
||
|
tuck mod dup 0=
|
||
|
until
|
||
|
drop ;
|