UNPKG

@lou.codes/iterables

Version:
19 lines (18 loc) 498 B
import type { Numeric, ReadOnlyIterable } from "@lou.codes/types"; /** * Drop the specified amount of items from the given iterable. * * @category Generators * @example * ```typescript * const drop2 = drop(2); * drop2([1, 2, 3, 4, 5]); // [3, 4, 5] * ``` * @param amount Amount of items to drop. * @returns Curried function with `amount` in context. */ export declare const drop: ( amount: Numeric, ) => <Item>( iterable: ReadOnlyIterable<Item>, ) => Readonly<IterableIterator<Item>>;