diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2020-11-09 03:48:14 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2020-11-09 03:48:14 +0900 |
commit | cb567b766dc4381e450ae9618b099636599fe3d6 (patch) | |
tree | fd2bb37de9cee2776fe24cc171316b953705c6e2 | |
parent | ea52d03d9a5e54d67534e911254127df7e5b8f54 (diff) |
wip12
-rw-r--r-- | vikalpa.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vikalpa.scm b/vikalpa.scm index 49f6477..e610b80 100644 --- a/vikalpa.scm +++ b/vikalpa.scm @@ -729,7 +729,7 @@ (define-function app (x y) (if (atom? x) y - (cons x (app (cdr x) y)))) + (cons (car x) (app (cdr x) y)))) (define-theorem associate-app (x y z) (equal? (app (app x y) z) @@ -744,3 +744,8 @@ (define (atom? x) (not (pair? x))) + +(define (app x y) + (if (atom? x) + y + (cons (car x) (app (cdr x) y)))) |