Paste: compile time execution

Author: kssreeram
Mode: text
Date: Sun, 2 Jan 2011 20:26:55
Plain Text |
factorial(n:Int) Int {
    if (n <= 1)
        return 1;
    return n * factorial(n-1);
}

main() {
    var x = static factorial(7);
    println(x);
    var y = unwrapStatic(x);
    println(y);
}

New Annotation

Summary:
Author:
Mode:
Body: