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 f4c8a091aa Make: refactor number type. Support large numbers.
- Can support numbers up to 100 decimal digits in length.
- Still no support for negative numbers or floating point.
- Change time-secs to time-ms and remove conditional in perf.mal
2015-01-09 16:16:56 -06:00

32 lines
395 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)) 300) 41)
;=>1689
(abc 1 2 3)
; .*\'abc\' not found.*
;;
;; -------- Optional Functionality --------
;; Testing evaluation within collection literals
[1 2 (+ 1 2)]
;=>[1 2 3]
{"a" (+ 7 8)}
;=>{"a" 15}
{:a (+ 7 8)}
;=>{:a 15}