Vectorize starting from insertelements building a vector
Constify functions