(defun factorial (x)
  (if (= x 0)
    1
    (* (factorial (- x 1)) x)
    )
  )

(defun loop-factorial (x)
  (let (i 0 acc 1)
    (while (< i x)
      (setq i (+ i 1))
      (setq acc (* acc i))
      )
    acc
    )
  )

;; TODO for loops?
(let (i 0)
  (while (<= i 15)
    (print i "\t" (factorial i) "\t" (loop-factorial i))
    (setq i (+ i 1))
    )
  )
