From f675338306652fc8accf3c5ba154b915d0d24cdc Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Sat, 3 Dec 2016 13:52:58 +1300 Subject: [PATCH] Added NOT and fixed PROCEDURE? --- src/scheme-library.scm | 4 ++++ src/scheme-primitives.4th | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/scheme-library.scm b/src/scheme-library.scm index 8260f90..faa9288 100644 --- a/src/scheme-library.scm +++ b/src/scheme-library.scm @@ -82,6 +82,10 @@ (define exact? #t) (define inexact? #t) +; Logic + +(define (not x) (if x #f #t)) + ;; LISTS (define (list . args) args) diff --git a/src/scheme-primitives.4th b/src/scheme-primitives.4th index 9203f71..934c80e 100644 --- a/src/scheme-primitives.4th +++ b/src/scheme-primitives.4th @@ -29,7 +29,13 @@ ; 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? \ }}} -- 2.20.1