Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in pattern matching example. #32

Open
zoj613 opened this issue Jul 5, 2022 · 0 comments
Open

Typo in pattern matching example. #32

zoj613 opened this issue Jul 5, 2022 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zoj613
Copy link

zoj613 commented Jul 5, 2022

In the pattern matching example, the line

>> map(fib, [0, 1, 2, 3, 4, 5, 6, 7, 8, 0])

produces inconsistent output value 34 for the last element (0) in the list. It should be 9 instead. Also, the output of this line would be a map iterator instead of a list in python 3 (if im not mistaken support for python 2 has been dropped?).

So it should be:

>> list(map(fib, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))

or

>> list(map(fib, range(10)))
@brandonwillard brandonwillard added bug Something isn't working documentation Improvements or additions to documentation help wanted Extra attention is needed good first issue Good for newcomers labels Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants