const func bigInteger: factorial (in bigInteger: n) is func result var bigInteger: fact is 1_; begin if n > 1_ then fact := n * factorial(pred(n)); end if; end func;