#ifndef MIGRAPH_GUARD_RTGLIB_FUNCTIONAL_HPP #define MIGRAPH_GUARD_RTGLIB_FUNCTIONAL_HPP #include namespace migraph { namespace detail { template struct fix_f { F f; template R operator()(Ts&&... xs) const { return f(*this, std::forward(xs)...); } }; } // namespace detail /// Implements a fix-point combinator template detail::fix_f fix(F f) { return {f}; } template auto fix(F f) { return fix(f); } } // namespace migraph #endif