From 3015167a300eb77560bbdfd780246e7d4a01dc04 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Wed, 20 Apr 2011 16:11:37 -0700 Subject: [PATCH] add stdlib with little schemer stuff --- stdlib.scm | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 stdlib.scm 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)))