function factorial (..._){
	var factor = _.shift();
	var ret = 1;
	while (factor > 0) {
		ret = ret * factor--;
	}
	return ret;
}

print(factorial(7));




// Compatibility functions
function print(...args){
	for (var arg of args){
		process.stdout.write(arg.toString())
	}
}