diff --git a/stdlib.scm b/stdlib.scm new file mode 100644 index 0000000..32298d1 --- /dev/null +++ b/stdlib.scm @@ -0,0 +1,6 @@ + +; for The Little Schemer +(define atom? (lambda (x) (and (not (pair? x)) (not (null? x))))) +(define add1 (lambda (x) (+ x 1))) +(define sub1 (lambda (x) (- x 1))) +(define zero? (lambda (x) (= x 0)))