FUNCTION Factorial (N : IN Positive) RETURN Positive IS -- Computes the factorial of N (N!) recursively -- Pre : N is defined -- Post: returns N! BEGIN -- Factorial IF N = 1 THEN RETURN 1; -- stopping case ELSE RETURN N * Factorial(N-1); -- recursion END IF; END Factorial;