UNPKG
babel-plugin-mini
Version:
latest (0.0.3)
0.0.3
0.0.2
0.0.1
转换小程序
github.com/jskit/babel-plugin-mini
jskit/babel-plugin-mini
babel-plugin-mini
/
lib
/
tail.js
16 lines
(12 loc)
•
259 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
function
tail
(
n
) {
return
fib
(n,
0
,
1
); }
function
fib
(
n, current, next
) {
if
(n ===
0
)
return
current;
return
fib
(n -
1
, next, current + next); }
exports
.
default
= tail;