summaryrefslogtreecommitdiff
path: root/tests/iota_rec.bth
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-07-13 12:34:33 +0100
committerubq323 <ubq323@ubq323.website>2024-07-13 12:34:33 +0100
commitcb738e17c9751fadc990fda75fa023a8fe9fd671 (patch)
tree599c94e8e9678e2393e81640faf46d9e660df820 /tests/iota_rec.bth
parentd9d307bc676387ab8894f9fb1ee722db8ecf7272 (diff)
add iota tests
Diffstat (limited to 'tests/iota_rec.bth')
-rw-r--r--tests/iota_rec.bth7
1 files changed, 7 insertions, 0 deletions
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))