diff options
Diffstat (limited to 'tests/step2_eval.mal')
| -rw-r--r-- | tests/step2_eval.mal | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/step2_eval.mal b/tests/step2_eval.mal new file mode 100644 index 0000000..33c7b17 --- /dev/null +++ b/tests/step2_eval.mal @@ -0,0 +1,19 @@ +;; Testing evaluation of arithmetic operations +(+ 1 2) +;=>3 + +(+ 5 (* 2 3)) +;=>11 + +(- (+ 5 (* 2 3)) 3) +;=>8 + +(/ (- (+ 5 (* 2 3)) 3) 4) +;=>2 + +;; Testing evaluation within collection literals +[1 2 (+ 1 2)] +;=>[1 2 3] + +{"a" (+ 7 8)} +;=>{"a" 15} |
