#pragma once #include namespace meta { namespace detail { template struct reverse_; template class x, typename... ys> struct reverse_, x> { using type = typename reverse_, x>::type; }; template class x, typename... ys> struct reverse_, x> { using type = x; }; template class inst, typename x> struct lift_; template class inst, template class x, typename... xs> struct lift_> { using type = inst; }; } template using reverse = typename detail::reverse_, std::tuple<>>::type; template class inst, class x> using lift = typename detail::lift_::type; template using first = x; template using rest = std::tuple; template using butlast = reverse>>; template using last = lift>; }