2014-07-13 01:04:16 +02:00
|
|
|
//// [recursiveReturns.ts]
|
|
|
|
function R1() {
|
|
|
|
R1();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
function R2() { R2(); }
|
|
|
|
|
|
|
|
function R3(n:number) {
|
|
|
|
if (n == 0) {
|
|
|
|
//return;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
R3(n--);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [recursiveReturns.js]
|
|
|
|
function R1() {
|
|
|
|
R1();
|
|
|
|
return;
|
|
|
|
}
|
2015-02-07 05:03:24 +01:00
|
|
|
function R2() { R2(); }
|
2014-07-13 01:04:16 +02:00
|
|
|
function R3(n) {
|
|
|
|
if (n == 0) {
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
R3(n--);
|
|
|
|
}
|
|
|
|
}
|