inline range<entity<Segments ... >> join(range<entity<Segments ... >> const & one, range<entity<Segments ... >> const & two) noexcept { return { std::min(one.offset(), two.offset()), (std::max(one.back(), two.back()) + 1) - std::min(one.offset(), two.offset()) }; }
inline range<entity<Segments ... >> take_first(range<entity<Segments ... >> const & object, type::index_t const count) noexcept { return { object.offset(), count % (object.length() + 1) }; }