Skip to content

Instantly share code, notes, and snippets.

@pnkfelix
Created August 21, 2013 16:09
Show Gist options
  • Save pnkfelix/6296520 to your computer and use it in GitHub Desktop.
Save pnkfelix/6296520 to your computer and use it in GitHub Desktop.
fact-tail
(define fact-tail
(lambda (n)
(let loop ((n n) (accum 1))
(cond ((zero? n) accum)
(else (loop (- n 1) (* accum n)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment