DanielKeep.github.io icon indicating copy to clipboard operation
DanielKeep.github.io copied to clipboard

Wrong Fibonacci Sequence Values in Macro Intro Article

Open DrTobe opened this issue 4 years ago • 0 comments

In section 4 of your excellent rust macro overview, you say about your hand-written Fibonacci sequence iterator

If we take this code and run it, we get:

0
1
2
3
5
8
13
21
34

Success!

I rather expected the sequence to start with 0, 1, 1, 2, 3, 5 ... which is also what the unit test at the end of the page expects. Apart from that, I can only repeat: Excellent article, thanks a lot!

DrTobe avatar Sep 11 '20 17:09 DrTobe