(export factorial (n) (Pure (-> (Int) Int)) (factorial' n 1)) (defun factorial' (n total) (Pure (-> (Int Int) Int)) (if (<= n 0) total (factorial' (- n 1) (* n total))))