code: func mul(vec []float64, factor float64) []float64 {
  	ret := make([]float64, len(vec))
  	for i := range vec {
  		ret[i] = vec[i] * factor
  	}
  	return ret
  }
docs: // mul returns vec multiplied by a scalar factor.