code: public static double norm_1(double[] a) {
      double sum = 0;
      for (double anA : a) {
        sum += (anA < 0 ? -anA : anA);
      }
      return sum;
    }
docs: Computes 1-norm of vector
  
  @param a A vector of double
  @return 1-norm of a