function _quantileSeqDim (data, prob, sorted, dim, fn) {
    return mapSlices(data, dim, x => fn(x, prob, sorted))
  }
Compute the prob order quantile of a matrix or a list with values.
The sequence is sorted and the middle value is returned.
Supported types of sequence values are: Number, BigNumber, Unit
Supported types of probability are: Number, BigNumber

In case of a multidimensional array or matrix, the prob order quantile
of all elements will be calculated.

Syntax:

    math.quantileSeq(A, prob[, sorted])
    math.quantileSeq(A, [prob1, prob2, ...][, sorted])
    math.quantileSeq(A, N[, sorted])

Examples:

    math.quantileSeq([3, -1, 5, 7], 0.5)         // returns 4
    math.quantileSeq([3, -1, 5, 7], [1/3, 2/3])  // returns [3, 5]
    math.quantileSeq([3, -1, 5, 7], 2)           // returns [3, 5]
    math.quantileSeq([-1, 3, 5, 7], 0.5, true)   // returns 4

See also:

    median, mean, min, max, sum, prod, std, variance

@param {Array, Matrix} data                A single matrix or Array
@param {Number, BigNumber, Array} probOrN  prob is the order of the quantile, while N is
                                           the amount of evenly distributed steps of
                                           probabilities; only one of these options can
                                           be provided
@param {Boolean} sorted=false              is data sorted in ascending order
@return {Number, BigNumber, Unit, Array}   Quantile(s)