Skip to content
This repository was archived by the owner on Feb 11, 2023. It is now read-only.

Commit f172b71

Browse files
committed
Fix to resolve issue #26.
The solution isn't good. It misses F(0). The output must be : 0 1 1 2 … and you have : 1 1 2 3 …
1 parent b5c5d17 commit f172b71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solutions/fib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import "fmt"
1111
// fibonacci is a function that returns
1212
// a function that returns an int.
1313
func fibonacci() func() int {
14-
f, g := 0, 1
14+
f, g := 1, 0
1515
return func() int {
1616
f, g = g, f+g
1717
return f

0 commit comments

Comments
 (0)