Schemeの手習いを 再復習2013/03/13 10:56

2章をちょこっと

gosh> suzuki-juunotto-no-MacBook-Pro:~ butcher$ gosh
gosh> (define atom?
(lambda (x)
(and (not (pair? x)) (not (list? x)))))

(define lat?
(lambda (l)
(cond
((null? l) #t)
((atom? (car l)) (lat? (cdr l)))
(else #f))))atom?
gosh> (let ((l '(bacon and eggs)))
lat?
gosh> (lat? l))