code: function arrayReplaceAt(src, pos, newElements) {
    return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));
  }
docs: Remove element from array and put another array at those position. Useful for some operations with tokens