Applies the given function to all the product types passed as arguments along with their indexes and stores the result in another product type, keeping the original elements order.
template<typename Function, product_type T, product_type... Ts>
constexpr auto map_index(Function && f, T && t, Ts &&... ts);
template<typename Function,
kumi::concepts::product_type T,
kumi::concepts::sized_product_type<kumi::size_v<T>>... Ts>
using map_index_t =
decltype(
kumi::map_index(std::declval<Function>(), std::declval<T>(), std::declval<Ts>()...));
template<typename Function,
kumi::concepts::product_type T,
kumi::concepts::sized_product_type<kumi::size_v<T>>... Ts>
struct map_index
{
using type = kumi::result::map_index_t<Function, T, Ts...>;
};