• Filters the values of the iterable using the given test function.

    Type Parameters

    • T

    Parameters

    • it: Iterable<any>
    • test: ((item, i?) => boolean)
        • (item, i?): boolean
        • Parameters

          • item: any
          • Optional i: number

          Returns boolean

    Returns Iterable<T>

    Example

    import { filter } from 'deleight/generators';
    filter(range(10), i=> 2 < i);