forth: Add . interop special operator and tests
[jackhill/mal.git] / tests / step2_eval.mal
CommitLineData
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
f4c8a091
JM
14(/ (- (+ 515 (* 222 311)) 300) 41)
15;=>1689
16
aef93ea3
JM
17(abc 1 2 3)
18; .*\'abc\' not found.*
19
9af8aee6
JM
20;;
21;; -------- Optional Functionality --------
22
31690700
JM
23;; Testing evaluation within collection literals
24[1 2 (+ 1 2)]
25;=>[1 2 3]
26
27{"a" (+ 7 8)}
28;=>{"a" 15}
b8ee29b2
JM
29
30{:a (+ 7 8)}
31;=>{:a 15}