Enum.find_index/2
defmodule Enum do
def find_index(enumerable, fun)
end
Returns the index (zero-based) of the first element for which fun
returns a truthy value.
If no such element is found it returns nil
.
defmodule Enum do
def find_index(enumerable, fun)
end
Returns the index (zero-based) of the first element for which fun
returns a truthy value.
If no such element is found it returns nil
.