X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scheme.forth.jl.git;a=blobdiff_plain;f=src%2Fscheme-primitives.4th;h=5ec154b5812c2754ea88e944b753a2193aeb3b3e;hp=8bcbb97e4f208e43e3f1e6e8f96a60c39019b58e;hb=613b910f0ceb0ec0948a0e0595cd3e82086754cf;hpb=adf3bf12d8ae16055f381d06079804068e6c1611 diff --git a/src/scheme-primitives.4th b/src/scheme-primitives.4th index 8bcbb97..5ec154b 100644 --- a/src/scheme-primitives.4th +++ b/src/scheme-primitives.4th @@ -219,6 +219,11 @@ swap negate swap ; 1 make-fa-primitive fix:neg +:noname ( fixnum -- -fixnum ) + swap abs swap +; 1 make-fa-primitive fix:abs + + ( Find the GCD of n1 and n2 where n2 < n1. ) : gcd ( n1 n2 -- m )