let factorial_f f = let n = iof f in assert (foi n = f); if n > 21 then failwith "Factorial: Too big!" else foi (factorial n)