UNPKG

@jasmith79/sequable

Version:

Library functions for working with generators

23 lines (22 loc) 588 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.concat = void 0; const sequable_js_1 = require("./sequable.js"); /** * Yields all of the items from sequence a then all of the items of sequence * b. * * @param a The first sequence to combine. * @param b The second sequence to combine. */ function concat(a, b) { const as = (0, sequable_js_1.toIterable)(a); const bs = (0, sequable_js_1.toIterable)(b); return { *[Symbol.iterator]() { yield* as; yield* bs; }, }; } exports.concat = concat;