1 object FactT {
2
3 def factT(n: Int, acc: Int): Int =
4 if (n == 0) acc else factT(n - 1, n * acc)
5
6 }