Enum.find

You're seeing just the function find, go back to Enum module for more information.
Link to this function

find(enumerable, default \\ nil, fun)

View Source

Specs

find(t(), default(), (element() -> any())) :: element() | default()

Returns the first element for which fun returns a truthy value. If no such element is found, returns default.

Examples

iex> Enum.find([2, 3, 4], fn x -> rem(x, 2) == 1 end)
3

iex> Enum.find([2, 4, 6], fn x -> rem(x, 2) == 1 end)
nil
iex> Enum.find([2, 4, 6], 0, fn x -> rem(x, 2) == 1 end)
0