Skip to content

Wrong Fibonacci Sequence Values in Macro Intro Article #15

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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