factorial

Returns the factorial of n

@safe nothrow
ulong
factorial
(
ulong n
)

Examples

assert(factorial(10) == 3_628_800);

int n = 5;
assert(n.factorial == 5.factorial && 5.factorial == 120);

Meta