shift function

Function to shift the elements of a vector.