Enum.any?/2
defmodule Enum do
def any?(enumerable, fun \\ fn x -> x end)
end
Returns true
if at least one element in enumerable
evaluates to a truthy value when the function fun
is applied over it.
If no element in enumerable
evaluates to a truthy value then the function returns false
.
On empty enumerables this function returns false
.