Skip to content

Instantly share code, notes, and snippets.

@wulftone
wulftone / factorial.js
Created November 27, 2013 09:49
Factorial function, recursive and cached for fast re-lookup.
(function(){
// Save a reference to the global object (`window` in the browser, `exports`
// on the server).
var root = this,
// Save the previous value of the `Factorial` variable, so that it can be
// restored later on, if `noConflict` is used.
previousFactorial = root.Factorial,
// The top-level namespace. All public Factorial classes and modules will

Keybase proof

I hereby claim:

  • I am wulftone on github.
  • I am wulftone (https://keybase.io/wulftone) on keybase.
  • I have a public key ASA5gAnhddkyQNChAG7nJfZqpcIM5EML67L74--1rquhogo

To claim this, I am signing this object: