From d8d3770f88d6acc37620d6577fa5a0b026fb1231 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Wed, 3 Jul 2024 12:01:22 +0100 Subject: add some failing tests for closures --- tests/clos3.bth | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/clos3.bth (limited to 'tests/clos3.bth') diff --git a/tests/clos3.bth b/tests/clos3.bth new file mode 100644 index 0000000..4742391 --- /dev/null +++ b/tests/clos3.bth @@ -0,0 +1,16 @@ +(defn (counter) + (let (a 0) + (fn () + (set a (+ a 1)) + (say a)))) +(def c1 (counter)) +(def c2 (counter)) +(c1) +(c1) +(c2) +(c2) +(c2) +(c2) +(c1) +(c1) + -- cgit v1.2.3