def tail(int jjj) { | |
println jjj | |
if (true) | |
return 1 + fact(jjj) | |
else 1 + <selection>fact</selection>(jjj) | |
} | |
int fact(int n) { | |
if (n > 0) { | |
return n * fact(n - 1) | |
} | |
else return 1 | |
} | |
----- | |
def tail(int jjj) { | |
println jjj | |
if (true) | |
return 1 + fact(jjj) | |
else { | |
int result | |
if (jjj > 0) { | |
result = jjj * fact(jjj - 1) | |
} else result = 1 | |
1 + result | |
} | |
} | |
int fact(int n) { | |
if (n > 0) { | |
return n * fact(n - 1) | |
} | |
else return 1 | |
} |