• Performs the given action for all items of the iterable.

    Type Parameters

    • T

    Parameters

    • it: Iterable<any>
    • action: ((item, i?) => T)
        • (item, i?): T
        • Parameters

          • item: any
          • Optional i: number

          Returns T

    Returns void

    Example

    import { forEach } from 'deleight/generators';
    forEach(range(10), ()=> console.log(i));