1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-10 12:47:45 +03:00
mal/tests/perf2.mal
2015-01-06 21:58:59 -06:00

14 lines
327 B
Plaintext

(load-file "../core.mal")
(load-file "../perf.mal")
;;(prn "Start: basic math/recursion test")
(def! sumdown (fn* (N) (if (> N 0) (+ N (sumdown (- N 1))) 0)))
(def! fib (fn* (N) (if (= N 0) 1 (if (= N 1) 1 (+ (fib (- N 1)) (fib (- N 2)))))))
(time (do
(sumdown 10)
(fib 12)))
;;(prn "Done: basic math/recursion test")