Skip to main content
4 of 4
Rollback to Revision 1
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k

As a point of reference it's not hard to make Times iterative, you just need to put everything inside a single function call:

ClearAll[g] g[0, total_] := total; g[n_, total_] := g[n - 1, total*n] g[n_] := g[n, 1] Block[{$IterationLimit = 30000}, g[5000] === 5000! ] 
True 
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k