2 ms·
The former is equivalent to fac' f 0 = 1 fac' f n = n * f (n-1) fix f = f (fix f) fac = fix fac' so if the second is indeed faster then exp
by tromp 11y ago
The former is equivalent to
fac' f 0 = 1
fac' f n = n * f (n-1)
fix f = f (fix f)
fac = fix fac'
so if the second is indeed faster then explicit fixpoints beat tail recursion