generate bytecode for script
It is just prototype * does not make top level symbols visible as class members yet * does not take parameters * Script class name is hardcoded now
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// expected: 3628800
|
||||
|
||||
fun factorial(n: Int): Int {
|
||||
var product = 1
|
||||
for (i in 1..n) {
|
||||
product *= i
|
||||
}
|
||||
return product
|
||||
}
|
||||
|
||||
factorial(10)
|
||||
Reference in New Issue
Block a user