mirror of
https://github.com/dschmenk/PLASMA.git
synced 2026-04-20 01:16:36 +00:00
Add list examplesd
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
(define
|
||||
(equal (lambda (x y)
|
||||
(cond ((and (atom x) (atom y)) (eq x y))
|
||||
((equal (car x) (car y)) (equal (cdr x) (cdr y)))
|
||||
(t f)
|
||||
))
|
||||
)
|
||||
(subst (lambda (x y z)
|
||||
(cond ((equal y z) x)
|
||||
((atom z) z)
|
||||
(t (cons (subst x y (car z)) (subst x y (cdr z))))
|
||||
))
|
||||
)
|
||||
(append (lambda (x y)
|
||||
(cond ((null x) y)
|
||||
(t (cons (car x) (append (cdr x) y)))
|
||||
))
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user