Function intersperse

  • Intersperse the the argument bewteen each element of the iterator.

    Example

       pipe(
    itr8FromArray([ 'hello', 'world', 'and', 'goodbye' ]),
    intersperse('|'), // => [ [ 'hello', '|', 'world', '|', 'and', '|', 'goodbye' ] ]
    );

    Example

       pipe(
    itr8FromArray([ 1, 2, 3, 4 ]),
    intersperse(true), // => [ 1, true, 2, true, 3, true, 4 ]
    );

    Parameters

    • intersperseThing: unknown

    Returns TTransIteratorSyncOrAsync<unknown, unknown>

Generated using TypeDoc