Commit | Line | Data |
---|---|---|
31690700 JM |
1 | ;; Testing evaluation of arithmetic operations |
2 | (+ 1 2) | |
3 | ;=>3 | |
4 | ||
5 | (+ 5 (* 2 3)) | |
6 | ;=>11 | |
7 | ||
8 | (- (+ 5 (* 2 3)) 3) | |
9 | ;=>8 | |
10 | ||
11 | (/ (- (+ 5 (* 2 3)) 3) 4) | |
12 | ;=>2 | |
13 | ||
b7b1787f JM |
14 | (/ (- (+ 515 (* 87 311)) 302) 27) |
15 | ;=>1010 | |
f4c8a091 | 16 | |
2c1eb1af DM |
17 | (* -3 6) |
18 | ;=>-18 | |
19 | ||
b7b1787f JM |
20 | (/ (- (+ 515 (* -87 311)) 296) 27) |
21 | ;=>-994 | |
a61be4d3 | 22 | |
f6f5d4f2 | 23 | ;;; This should throw an error with no return value |
aef93ea3 | 24 | (abc 1 2 3) |
f6f5d4f2 | 25 | ;/.+ |
aef93ea3 | 26 | |
46e25689 JM |
27 | ;; Testing empty list |
28 | () | |
29 | ;=>() | |
30 | ||
a1eb30fc | 31 | ;>>> deferrable=True |
9af8aee6 | 32 | ;; |
77fd710c | 33 | ;; -------- Deferrable Functionality -------- |
9af8aee6 | 34 | |
31690700 JM |
35 | ;; Testing evaluation within collection literals |
36 | [1 2 (+ 1 2)] | |
37 | ;=>[1 2 3] | |
38 | ||
39 | {"a" (+ 7 8)} | |
40 | ;=>{"a" 15} | |
b8ee29b2 JM |
41 | |
42 | {:a (+ 7 8)} | |
43 | ;=>{:a 15} | |
a8e337b2 BH |
44 | |
45 | ;; Check that evaluation hasn't broken empty collections | |
46 | [] | |
47 | ;=>[] | |
48 | {} | |
49 | ;=>{} |