toMap(keySelector, valueSelector) {
        let map = new Map();
        for (let item of this._iterable) {
            let key = keySelector(item);
            let val = valueSelector(item);

            if (map.has(key)) {
                throw new Error(`Duplicate key <${key}>. Came from item <${item}>.`);
            }
            map.set(key, val);
        }
        return map;
    }
Returns a map containing the key/value pairs created by projecting each of the items in the sequence through
key and value selector functions.

If any duplicate keys are generated, an exception is thrown.

@param {!function(T): K} keySelector
@param {!function(T): V} valueSelector
@returns {!Map.<K, V>}
@template T, K, V