Skip to main content

function

factorial

factorial(n: Int) -> Int

Computes the factorial of the integer.

Args:

  • n (Int): The input value. Must be non-negative.

Returns:

The factorial of the input. Results are undefined if the input is negative.

Was this page helpful?