For reference, I think the most efficient way to do this currently is:
vec.splice(..0, repeat(x).take(n));