summaryrefslogtreecommitdiff
path: root/test/files/run/t5274_1.scala
blob: 7ef332aa05a6feb3adbefccc2943947ed8fd2974 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import scala.reflect.mirror._

object Test extends App {
  reify {
    def factorial(n: BigInt): BigInt =
      if (n == 0) 1 else n * factorial(n-1)

    val f50 = factorial(50); val f49 = factorial(49)
    println("50! = " + f50)
    println("49! = " + f49)
    println("50!/49! = " + (f50 / f49))
  }.eval
}