jank
jank copied to clipboard
Consider moving `fresh_seq` to `sequenceable_in_place`
fresh_seq is only meaningful implement alongside next_in_place, which is in sequenceable_in_place.
Thought more about this. sequenceable_* is meant for sequences, where as fresh_seq is meant for seqables. We could have both seqable and seqable_in_place, but every seqable should be seqable in place. So, not sure if moving this makes sense.
Maybe it makes more sense to move next_in_place back into sequenceable.
Maybe it makes more sense to move next_in_place back into sequenceable.
Yeah probably. We can get rid of this template and delegate to implementations.
template <typename T>
requires(behavior::sequenceable<T> && !behavior::sequenceable_in_place<T>)
auto next_in_place(native_box<T> const s)
{
/* Not all sequences can be updated in place. For those, just gracefully
* do a normal next. */
return s->next();
}