summaryrefslogtreecommitdiff
path: root/pit/test
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-09-01 20:59:47 -0400
committerLLLL Colonq <llll@colonq>2026-09-01 20:59:47 -0400
commita107593b6b362fb68e409c9d7b79427776d137d7 (patch)
treee12f7ac95177432abb477273fb5f11122bafb38a /pit/test
parentff7407c146b8129c2f1cc7ebe3b5771ad2f5dfdd (diff)
pit: Tail call optimization!HEADmaster
Diffstat (limited to 'pit/test')
-rw-r--r--pit/test/test6.pit7
-rw-r--r--pit/test/test8.pit2
2 files changed, 6 insertions, 3 deletions
diff --git a/pit/test/test6.pit b/pit/test/test6.pit
index 93e5860..cb04f22 100644
--- a/pit/test/test6.pit
+++ b/pit/test/test6.pit
@@ -1,5 +1,6 @@
(print!
- (case 'bar
- (foo 1)
- (bar 2)))
+ ((case 'baz
+ (foo (lambda (x) (+ x 1)))
+ (bar (lambda (x) (+ x 2))))
+ 3))
\ No newline at end of file
diff --git a/pit/test/test8.pit b/pit/test/test8.pit
new file mode 100644
index 0000000..3b41d7a
--- /dev/null
+++ b/pit/test/test8.pit
@@ -0,0 +1,2 @@
+(defun! foo (x) (+ x 1))
+(foo 2) \ No newline at end of file