From 991e694b558691264f82d80a7aa1b86ef3d2c92c Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 27 Jun 2024 12:01:33 +0100 Subject: more tests --- tests/sumrec.bth | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/sumrec.bth (limited to 'tests/sumrec.bth') diff --git a/tests/sumrec.bth b/tests/sumrec.bth new file mode 100644 index 0000000..8c8804a --- /dev/null +++ b/tests/sumrec.bth @@ -0,0 +1,7 @@ +(set f' (fn (x acc) + (if (< x 1) + acc + (f' (- x 1) (+ acc x))))) +(set f (fn (x) (f' x 0))) +(say (f 10)) +(say (f 100)) -- cgit v1.2.3