For vectors, rseq
is to reverse
what peek
is to last
. rseq
reverses in constant time (!) where reverse
is in linear time, as it appears to pull everything into a new seq, one at a time instead of ... reversing the keys? I don't know the implementation details, but I do know that rseq
is magnitudes faster than reverse
for vectors and sorted maps.