The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Can now make it through first chapter of SICP.
[scheme.forth.jl.git]
/
src
/
scheme-primitives.4th
diff --git
a/src/scheme-primitives.4th
b/src/scheme-primitives.4th
index
8bcbb97
..
5ec154b
100644
(file)
--- a/
src/scheme-primitives.4th
+++ b/
src/scheme-primitives.4th
@@
-219,6
+219,11
@@
swap negate swap
; 1 make-fa-primitive fix:neg
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 )
( Find the GCD of n1 and n2 where n2 < n1. )
: gcd ( n1 n2 -- m )