修复打印的斐波那契数列出现0的问题 (#713)

因为 chan c 中并没有把最开始放入的0给移除,造成打印数列中多出一个错误的0值。
This commit is contained in:
Alan
2019-08-17 05:34:35 +08:00
committed by ᴊ. ᴄʜᴇɴ
parent 50c2158fe0
commit c07cc53168

View File

@@ -30,6 +30,7 @@ func fib() <-chan int {
x <- <-a + <-b x <- <-a + <-b
} }
}() }()
<- out
return out return out
} }