static double[] doubleMul(double[] l, double factor) { if (factor == 1) ret l; int n = l(l); double[] x = new[n]; for i to n: x[i] = l[i]*factor; ret x; }