Return the specified iterable if the source iterable is empty
function or(other) {
    return function* (source) {
        let hasYieldedItem = false;
        for (const item of source) {
            yield item;
            hasYieldedItem = true;
        }
        if (!hasYieldedItem) {
            yield* other;
        }
    };
}