diff options
Diffstat (limited to 'vikalpa.scm')
-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)))) |