Skip to content

Instantly share code, notes, and snippets.

@vhf
Last active November 1, 2015 13:12
Show Gist options
  • Save vhf/5560a6502d5147a766f6 to your computer and use it in GitHub Desktop.
Save vhf/5560a6502d5147a766f6 to your computer and use it in GitHub Desktop.
function facRec2(_x2) {
var _arguments = arguments;
var _again = true;
var __x2 = _x2;
_function: while (_again) {
var x = __x2;
_again = false;
var acc = _arguments.length <= 1 || _arguments[1] === undefined ? 1 : _arguments[1];
if (x <= 1) {
return acc;
} else {
_arguments = [__x2 = x - 1, x * acc];
_again = true;
acc = undefined;
continue _function;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment