function flatMap(mapper) {
    return function* (iterable) {
        let index = 0;
        for (const value of iterable) {
            const innerIterable = mapper(value, index);
            for (const inner of innerIterable) {
                yield inner;
            }
            index = index + 1;
        }
    };
}
function flatMap(mapper) {
    return function* (iterable) {
        let index = 0;
        for (const value of iterable) {
            const innerIterable = mapper(value, index);
            for (const inner of innerIterable) {
                yield inner;
            }
            index = index + 1;
        }
    };
}
function flatMap ( mapper ) { return function * ( iterable ) { let index = 0 ; for ( const value of iterable ) { const innerIterable = mapper ( value , index ) ; for ( const inner of innerIterable ) { yield inner ; } index = index + 1 ; } } ; }
Yield all items in every iterable returned by the mapper when applied to every item in the source iterable
Yield all items in every iterable returned by the mapper when applied to every item in the source iterable