• Returns a Stream that yields elements from the source that are Iterable and flattens them.

    Type Parameters

    • T

      Type of items in the source.

    Returns OperationFunction<Iterable<T>, T>

    Operation that yields elements from the source that are Iterable and flattens them.

    const result = flat<number>()([[1, 2], [3, 4]]);
    console.log([...result]); // [1, 2, 3, 4]