Skip to content

Range as first argument to Enum.find doesn't return "ifnone" #1653

@jgallagher

Description

@jgallagher

It looks like the "ifnone" argument to Enum.find is ignored if the collection is a range:

iex(19)> Enum.find(1..2,3, &1 == 3)
nil
iex(20)> Enum.find([1,2],3, &1 == 3)
3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions