Skip to content

Wrong Fibonacci Sequence Values in Macro Intro Article #15

@DrTobe

Description

@DrTobe

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions