diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-17 18:38:50 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-17 18:38:50 +0200 |
commit | c581804c6ffa5824a9b762097a990425007e49cf (patch) | |
tree | 516e314a60d537d8e1617f945afc8a12b3e0d61f /tests/variables_expected.txt | |
parent | 7fee0fc28809042a2ecbc03f2e1b5b569073982b (diff) | |
download | bdl-c581804c6ffa5824a9b762097a990425007e49cf.tar.gz bdl-c581804c6ffa5824a9b762097a990425007e49cf.zip |
Add let/set/struct parsing
Diffstat (limited to 'tests/variables_expected.txt')
-rw-r--r-- | tests/variables_expected.txt | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/variables_expected.txt b/tests/variables_expected.txt deleted file mode 100644 index 02a5f7a..0000000 --- a/tests/variables_expected.txt +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | (def a 20) | ||
2 | ((lambda (a b) (+ 10 a b)) 1 2) -> 13 | ||
3 | ((lambda (a b) (+ 10 a b)) a 3) -> 33 | ||
4 | (def myfun (lambda (a b) (+ a b))) (myfun 6 9) -> 15 | ||
5 | (fun myfun (a b) (+ a b)) (myfun 6 9) -> 15 | ||
6 | (+ 1 (myfun 10 (myfun a a)) 30) -> 81 | ||
7 | (myfun 10 (myfun 5 0)) -> 15 | ||
8 | (fun make-counter () (def value 0) (def counter (lambda () (set! value (+ value 1)) value)) counter) | ||
9 | (def counter-a (make-counter)) | ||
10 | (def counter-b (make-counter)) | ||
11 | (counter-a) -> 1 | ||
12 | (counter-b) -> 1 | ||
13 | (counter-a) -> 2 | ||
14 | (counter-a) -> 3 | ||
15 | (counter-a) -> 4 | ||
16 | (counter-b) -> 2 | ||
17 | (counter-b) -> 3 | ||
18 | (counter-b) -> 4 | ||
19 | (fun fib (n) (if (<= n 2) 1 (+ (fib (- n 1)) (fib (- n 2))))) | ||
20 | (fib 15) -> 610 | ||
21 | (fun b () (display a) (print " --- ") (def a 42) (display a) (newline)) | ||
22 | (b) -> 20 --- 42 | ||
23 | (b) -> 20 --- 42 | ||