Compute a vector of midpoints between values in a numeric vector
mid(x)
x
a numeric vector
a vector of length 1 less than x
mid(1:5) mid((1:5)^2)