1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-20 10:07:45 +03:00
mal/tests/step2_eval.mal
Joel Martin a1eb30fcc9 Use more common spelling of deferrable.
Deferable is apprently a less common but correct spelling.
2016-05-10 10:26:39 -05:00

44 lines
541 B
Plaintext

;; Testing evaluation of arithmetic operations
(+ 1 2)
;=>3
(+ 5 (* 2 3))
;=>11
(- (+ 5 (* 2 3)) 3)
;=>8
(/ (- (+ 5 (* 2 3)) 3) 4)
;=>2
(/ (- (+ 515 (* 222 311)) 302) 27)
;=>2565
(* -3 6)
;=>-18
(/ (- (+ 515 (* -222 311)) 296) 27)
;=>-2549
(abc 1 2 3)
; .*\'abc\' not found.*
;; Testing empty list
()
;=>()
;>>> deferrable=True
;>>> optional=True
;;
;; -------- Deferrable/Optional Functionality --------
;; Testing evaluation within collection literals
[1 2 (+ 1 2)]
;=>[1 2 3]
{"a" (+ 7 8)}
;=>{"a" 15}
{:a (+ 7 8)}
;=>{:a 15}