guide: update step9, stepA diagrams.
[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
90ab3171
JM
14(/ (- (+ 515 (* 222 311)) 302) 27)
15;=>2565
f4c8a091 16
2c1eb1af
DM
17(* -3 6)
18;=>-18
19
a61be4d3
JM
20(/ (- (+ 515 (* -222 311)) 296) 27)
21;=>-2549
22
aef93ea3
JM
23(abc 1 2 3)
24; .*\'abc\' not found.*
25
9af8aee6
JM
26;;
27;; -------- Optional Functionality --------
28
31690700
JM
29;; Testing evaluation within collection literals
30[1 2 (+ 1 2)]
31;=>[1 2 3]
32
33{"a" (+ 7 8)}
34;=>{"a" 15}
b8ee29b2
JM
35
36{:a (+ 7 8)}
37;=>{:a 15}
a26c2568
JM
38
39;; Testing empty list
40()
41;=>()