3 Forward declares `boost::hana::fold`.
5 @copyright Louis Dionne 2013-2017
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_FWD_FOLD_HPP
11 #define BOOST_HANA_FWD_FOLD_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/fwd/fold_left.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Equivalent to `fold_left`; provided for convenience.
19 //! @ingroup group-Foldable
21 //! `fold` is equivalent to `fold_left`. However, it is not tag-dispatched
22 //! on its own because it is just an alias to `fold_left`. Also note that
23 //! `fold` can be called with or without an initial state, just like
27 //! fold(xs, state, f) == fold_left(xs, state, f)
28 //! fold(xs, f) == fold_left(xs, f)
34 //! @include example/fold.cpp
35 constexpr auto fold = fold_left;
36 BOOST_HANA_NAMESPACE_END
38 #endif // !BOOST_HANA_FWD_FOLD_HPP