0
  B   ˆl–Ãa¾”êh¥2 ¸&®6â˜´o�þdh+7) ä�n1ˆ þÂƒe—ÙÁ_‹I|¥�+ýÿ¹ä³ÁÀ A    /*!
@file
Defines `boost::hana::compose`.

@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
 */

#ifndef BOOST_HANA_FUNCTIONAL_COMPOSE_HPP
#define BOOST_HANA_FUNCTIONAL_COMPOSE_HPP

#include <boost/hana/config.hpp>
#include <boost/hana/detail/create.hpp>
#include <boost/hana/detail/variadic/foldl1.hpp>

#include <utility>


BOOST_HANA_NAMESPACE_BEGIN
    //! @ingroup group-functional
    //! Return the composition of two functions or more.
    //!
    //! `compose` is defined inductively. When given more than two functions,
    //! `compose(f, g, h...)` is equivalent to `compose(f, compose(g, h...))`.
    //! When given two functions, `compose(f, g)` is a function such that
    //! @code
    //!     compose(f, g)(x, y...) == f(g(x), y...)
    //! @endcode
    //!
    //! If you need composition of the form `f(g(x, y...))`, use `demux` instead.
    //!
    //! @note
    //! `compose` is an associative operation; `compose(f, compose(g, h))`
    //! is equivalent to `compose(compose(f, g), h)`.
    //!
    //! @internal
    //! ### Proof of associativity
    //!
    //! @code
    //!     compose(f, compose(g, h))(x, xs...) == f(compose(g, h)(x), xs...)
    //!                                         == f(g(h(x)), xs...)
    //!
    //!     compose(compose(f, g), h)(x, xs...) == compose(f, g)(h(x), xs...)
    //!                                         == f(g(h(x)), xs...)
    //! @endcode
    //! @endinternal
    //!
    //! ### Example
    //! @include example/functional/compose.cpp
#ifdef BOOST_HANA_DOXYGEN_INVOKED
    constexpr auto compose = [](auto&& f1, auto&& f2, ..., auto&& fn) {
        return [perfect-capture](auto&& x, auto&& ...xs) -> decltype(auto) {
            return forwarded(f1)(
                    forwarded(f2)(
                     ...
                      forwarded(fn)(forwarded(x))
                    ),
                    forwarded(xs)...
                );
        }
    };
#else
    template <typename F, typename G>
    struct _compose {
        F f; G g;

        template <typename X, typename ...Xs>
        constexpr decltype(auto) operator()(X&& x, Xs&& ...xs) const& {
            return f(
                g(static_cast<X&&>(x)),
                static_cast<Xs&&>(xs)...
            );
        }

        template <typename X, typename ...Xs>
        constexpr decltype(auto) operator()(X&& x, Xs&& ...xs) & {
            return f(
                g(static_cast<X&&>(x)),
                static_cast<Xs&&>(xs)...
            );
        }

        template <typename X, typename ...Xs>
        constexpr decltype(auto) operator()(X&& x, Xs&& ...xs) && {
            return std::move(f)(
                std::move(g)(static_cast<X&&>(x)),
                static_cast<Xs&&>(xs)...
            );
        }
    };

    struct _make_compose {
        template <typename F, typename G, typename ...H>
        constexpr decltype(auto) operator()(F&& f, G&& g, H&& ...h) const {
            return detail::variadic::foldl1(detail::create<_compose>{},
                static_cast<F&&>(f),
                static_cast<G&&>(g),
                static_cast<H&&>(h)...
            );
        }
    };

    constexpr _make_compose compose{};
#endif
BOOST_HANA_NAMESPACE_END

#endif // !BOOST_HANA_FUNCTIONAL_COMPOSE_HPP
  /   ˆ{‹„„-i[D<†ªoZƒ›Ù«Ä551_‘I|¥‰ÓMdœv ©ƒ†ü+=ÄÃ '    ‹      Õ–ÑnÚ0†ïûž/v‡ m7šxêÒP) Ê4MÓ.Ç!ÆŽlCÆž~†°•M uš:-7'‰óçœï?qb‡/âIþq:@ïæ÷#4}ÿv4ì#Ü øÐéÄó¸ºÑm¶€Á#œ;Wô Ê²l–�¦6˜Ï w+ÙëŒ`®™º“‹p7F.P˜sšú#
�p’“¡Jù¤3zí¬Hy
£¸ÜxaÃr™�ÑÚ�ÝZ`’ZBk|Ã•ë@Ê7‚q`´ ‰�Â	nC¨Rûbp¨&:Ýî ‚ç)èóî-Ñd_wwjHèr´¡R,T„�.0	Åj�¬aÁ´²�Hª–Í…È0¢ÒEøÓ°?ùìuf÷4	)òTY„ßô£ñÍ$Š1Ó�žÖÜ{Í-&#jZéTd‚§gÅ•øA|=Ÿ0®41·ÌˆÂ	­¥à-[eZÚ‚z¯—ÞAnŽU•$ý]7(û©ÓÛÙ`<�‡³ª%é.Å#Ýß½>L¦ÔøÃ™Óf{0VUy©[Ü|¿Dl#¹Ã¡:©ü¯kµTºTÇv}+O¥‰ÅÄ‡cÀ_ˆÚ­öU#Ák\÷Z×�ú÷î¢ó&|SCð,Ã$Ëž Þ¾BÁ«ÞåÕÿ¾ä[L|¨aÏ%÷ë„üñÃªS×W–aâCÑ—˜øPÃ	c•Ÿ0>Ô°ë¶ôäåóƒ?qy†ÃÆ%„ý>)„j³önÑ§Í
   