2014-07-13 01:04:16 +02:00
|
|
|
//// [recursiveInference1.ts]
|
|
|
|
function fib(x:number) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); }
|
|
|
|
var result = fib(5);
|
|
|
|
|
|
|
|
//// [recursiveInference1.js]
|
2015-02-07 05:03:24 +01:00
|
|
|
function fib(x) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); }
|
2014-07-13 01:04:16 +02:00
|
|
|
var result = fib(5);
|