1 def factorial(x: BigInt): BigInt = 
2     if (x == 0) 1 else x * factorial(x - 1)
3   
4 println(factorial(30))

BigInt就像是内建的类型,任何scala程序员都可以,去定义他