Of course x[Not(end)] is also great choice if we are using DataFrames.jl, or just x[(end-1):end] is OK. But maybe front and tail are very useful like first and last. Is there any reason why the functions are not defined for other collections, for instance, performance issue?
I don’t know about historical reasons, but generalizing this is a little tough. For tuples, they are not allocating - the compiler knows exactly the type of Tuple it will return based on the argument. But to do this for a Vector, you’d either need to make a new container or return a surprise View.
Edit: one other option is a mutation with pop! or popfirst! … But we already have those functions
I’ve only seen these methods used commonly for recursive inlined Tuple iteration. If comprehension was type stable for tuples it’d probably be used instead.