Returns a new iterable set that does not have the element at index
function removeAt(index) {
    return function* (source) {
        let i = 0;
        for (const item of source) {
            if (i !== index) {
                yield item;
            }
            i = i + 1;
        }
    };
}