/** * Takes `n` elements from the iterable `list` and returns them as an array. * * @example * ``` * take(5, repeat(1, 2)) // -> [1, 2, 1, 2, 1] * take(3, [1, 2, 3, 4]) // -> [1, 2, 3] * take(3, [1, 2]) // -> [1, 2] * ``` */ export declare const takeList: (n: number, list: Iterable) => T[]; /** * Takes `n` elements from the iterable `list` and returns them as a generator. * * @example * ``` * [...take(5, repeat(1, 2))] // -> [1, 2, 1, 2, 1] * [...take(3, [1, 2, 3, 4])] // -> [1, 2, 3] * [...take(3, [1, 2])] // -> [1, 2] * ``` */ export declare function takeGenerator(n: number, list: Iterable): Generator;