Mojo 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 for negative inputs.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!