summaryrefslogtreecommitdiff
path: root/tests/sumrec_local2.bth
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sumrec_local2.bth')
-rw-r--r--tests/sumrec_local2.bth8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/sumrec_local2.bth b/tests/sumrec_local2.bth
new file mode 100644
index 0000000..c9b9703
--- /dev/null
+++ b/tests/sumrec_local2.bth
@@ -0,0 +1,8 @@
+(defn (f x)
+ (defn (f' x acc)
+ (if (< x 1)
+ acc
+ (f' (- x 1) (+ acc x))))
+ (f' x 0))
+(say (f 10))
+(say (f 1000))