summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2020-11-09 03:45:20 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2020-11-09 03:45:20 +0900
commitea52d03d9a5e54d67534e911254127df7e5b8f54 (patch)
tree127827e1e30502617c4db6a1f20a6c3d843d59d2
parent7a238e7df0c9c7c684b7f761f495b21aa088bd68 (diff)
wip11
-rw-r--r--vikalpa.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/vikalpa.scm b/vikalpa.scm
index 5a51cfa..49f6477 100644
--- a/vikalpa.scm
+++ b/vikalpa.scm
@@ -680,7 +680,7 @@
(equal? (cons (car x) (cdr y)) x)
'#t)
y))
- (define-axiom cons/car+cdr (x y)
+ (define-axiom cons/car+cdr (x y)
(equal? (if (pair? x)
(equal? (cons (car x) (cdr y)) x)
'#t)
@@ -729,7 +729,7 @@
(define-function app (x y)
(if (atom? x)
y
- (cons x (app x y))))
+ (cons x (app (cdr x) y))))
(define-theorem associate-app (x y z)
(equal? (app (app x y) z)
@@ -741,3 +741,6 @@
(size (car x))
(size (cdr x)))
0))
+
+(define (atom? x)
+ (not (pair? x)))