diff --git a/AK/AnyOf.h b/AK/AnyOf.h index f651f3eec6..5d851a97fe 100644 --- a/AK/AnyOf.h +++ b/AK/AnyOf.h @@ -24,11 +24,7 @@ constexpr bool any_of( template constexpr bool any_of(Container&& container, auto const& predicate) { - for (auto&& entry : container) { - if (predicate(entry)) - return true; - } - return false; + return any_of(container.begin(), container.end(), predicate); } }