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

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
}