src/vs/base/common/sequence.ts/SimpleSequence/constructor
class SimpleSequence:	constructor(elements: T[], onDidAdd: Event<T>, onDidRemove: Event<T>) {
		this._elements = [...elements];
		this.onDidSplice = Event.any(
			Event.map(onDidAdd, e => ({ start: this.elements.length, deleteCount: 0, toInsert: [e] })),
			Event.map(Event.filter(Event.map(onDidRemove, e => this.elements.indexOf(e)), i => i > -1), i => ({ start: i, deleteCount: 1, toInsert: [] }))
		);

		this.disposable = this.onDidSplice(({ start, deleteCount, toInsert }) => this._elements.splice(start, deleteCount, ...toInsert));
	}