Leverage index sequences to implement _pop_n.