/* * Copyright (c) 2021, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace AK { template TIterator> constexpr bool any_of( TIterator const& begin, TEndIterator const& end, auto const& predicate) { return find_if(begin, end, predicate) != end; } template constexpr bool any_of(Container&& container, auto const& predicate) { for (auto&& entry : container) { if (predicate(entry)) return true; } return false; } } using AK::any_of;