iris

small scheme interpreter
git clone git://git.2f30.org/iris.git
Log | Files | Refs | LICENSE

commit 555f52ffef1fcd2f275a20aca5670305919c4417
parent 7453bc38dce5d5785c979fab65d4b2a8af5a27eb
Author: sin <sin@2f30.org>
Date:   Mon May 19 13:01:08 +0100

Add tests dir

Diffstat:
tests/fib.scm | 9+++++++++
tests/map.scm | 9+++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/tests/fib.scm b/tests/fib.scm @@ -0,0 +1,9 @@ +(define fib + (lambda (n) + (if (lt n 2) + n + (plus + (fib (diff n 1)) + (fib (diff n 2)))))) + +(fib 20) diff --git a/tests/map.scm b/tests/map.scm @@ -0,0 +1,9 @@ +(define map (lambda (proc items) + (if (null items) + '() + (cons (proc (car items)) + (map proc (cdr items)))))) + +(define double (lambda (n) (plus n n))) + +(map double '(0 1 2 3))