Skip to content

Typo in pattern matching example. #32

Open
@zoj613

Description

@zoj613

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)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions