From cb738e17c9751fadc990fda75fa023a8fe9fd671 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 13 Jul 2024 12:34:33 +0100 Subject: add iota tests --- tests/iota_rec.bth | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/iota_rec.bth (limited to 'tests/iota_rec.bth') diff --git a/tests/iota_rec.bth b/tests/iota_rec.bth new file mode 100644 index 0000000..8e274a4 --- /dev/null +++ b/tests/iota_rec.bth @@ -0,0 +1,7 @@ +(defn (iota' arr i max) + (if (< i max) + (iota' (append arr i) (+ i 1) max) + arr)) +(set! _G_iota' iota') +(defn (iota n) (_G_iota' [] 0 n)) +(say (iota 10)) -- cgit v1.2.3