Added NOT and fixed PROCEDURE?
authorTim Vaughan <tgvaughan@gmail.com>
Sat, 3 Dec 2016 00:52:58 +0000 (13:52 +1300)
committerTim Vaughan <tgvaughan@gmail.com>
Sat, 3 Dec 2016 00:52:58 +0000 (13:52 +1300)
src/scheme-library.scm
src/scheme-primitives.4th

index 8260f90..faa9288 100644 (file)
 (define exact? #t)
 (define inexact? #t)
 
+; Logic
+
+(define (not x) (if x #f #t))
+
 ;; LISTS
 
 (define (list . args) args)
index 9203f71..934c80e 100644 (file)
 ; 1 make-fa-primitive pair?
 
 :noname ( args -- boolobj )
-    primitive-proc-type istype? -rot 2drop boolean-type
+    primitive-proc-type istype? if
+        true
+    else
+        compound-proc-type istype?
+    then
+        
+    -rot 2drop boolean-type
 ; 1 make-fa-primitive procedure?
 
 \ }}}