code: public static double sum(double[][] matrix) {
          double sum = 0; 
          for (int i=0; i<matrix.length; i++) {
              sum += sum(matrix[i]);
          }
          return sum;
      }
docs: TODO: This should live in a matrix class