projects
/
tech-radar.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Revert "fixed fib sum, it was doing the sum for lenght + 1"
[tech-radar.git]
/
src
/
util
/
fib.js
diff --git
a/src/util/fib.js
b/src/util/fib.js
index
93719bc
..
2170b44
100644
(file)
--- a/
src/util/fib.js
+++ b/
src/util/fib.js
@@
-15,7
+15,7
@@
tr.util.Fib = function () {
if (length === 0) { return 0; }
if (length === 1) { return 1; }
- return self.sequence(length).reduce(function (previous, current) {
+ return self.sequence(length
+ 1
).reduce(function (previous, current) {
return previous + current;
}, 0);
};