summaryrefslogtreecommitdiff
path: root/tests/clos2.bth
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-07-03 12:01:22 +0100
committerubq323 <ubq323@ubq323.website>2024-07-03 12:06:42 +0100
commitd8d3770f88d6acc37620d6577fa5a0b026fb1231 (patch)
tree65808bc58319a3002b6690b1811ab02fbf4ddc2d /tests/clos2.bth
parent9f4e10da9df486b4c048ec2fedbe28491059b739 (diff)
add some failing tests for closures
Diffstat (limited to 'tests/clos2.bth')
-rw-r--r--tests/clos2.bth15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/clos2.bth b/tests/clos2.bth
new file mode 100644
index 0000000..9e1fe24
--- /dev/null
+++ b/tests/clos2.bth
@@ -0,0 +1,15 @@
+(defn (k1 x)
+ (fn () x))
+(defn (k2 x)
+ (let (v x)
+ (fn () v)))
+(def a1 (k1 100))
+(def a2 (k2 200))
+(def b1 (k1 "hello 1"))
+(def b2 (k2 "hello 2"))
+(say (a1))
+(say (a2))
+(say (b1))
+(say (b2))
+(say (a1))
+(say (a2))