static list_t append_helper(list_t first, list_t appended) { if (list_isEmpty(first)) return appended; return append_helper(list_rest(first), list_make(list_first(first), appended)); }
list_t append(list_t first, list_t second) { return append_helper(reverse(first), second); }
static constexpr auto apply(Xs&& xs, X&& x) { constexpr std::size_t N = decltype(hana::length(xs))::value; return append_helper(static_cast<Xs&&>(xs), static_cast<X&&>(x), std::make_index_sequence<N> {}); }