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