A fork of Crisp for HARP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 line
327 B

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