function reverseCurve(path) {
    var rotatedCurve = path.slice(1)
      .map(function (x, i, curveOnly) { return (!i
        ? path[0].slice(1).concat( x.slice(1))
        : curveOnly[i - 1].slice(-2).concat( x.slice(1))); })
      .map(function (x) { return x.map(function (_, i) { return x[x.length - i - 2 * (1 - (i % 2))]; }); })
      .reverse();

    return [['M' ].concat( rotatedCurve[0].slice(0, 2)) ].concat( rotatedCurve.map(function (x) { return ['C' ].concat( x.slice(2)); }));
  }
Reverses all segments of a `pathArray`
which consists of only C (cubic-bezier) path commands.

@param {SVGPath.curveArray} path the source `pathArray`
@returns {SVGPath.curveArray} the reversed `pathArray`