fork(2) download
  1. factorial(n) = factorial_helper(n, 1)
  2.  
  3. factorial_helper(n, prod) =
  4. if n > 0 then
  5. factorial_helper (n - 1, prod * n)
  6. else
  7. prod
  8.  
  9.  
  10.  
  11. main = print $ factorial 100
Success #stdin #stdout 0s 6268KB
stdin
Standard input is empty
stdout
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000