iter-fns - v0.13.0
    Preparing search index...

    Function cartesianProduct

    • Iterates over the Cartesian product of the iterables.

      If no iterables are supplied, a single empty array will be yielded.

      In order to support iterables that can only be iterated over once, an internal copy of each item in the iterable is saved.

      Type Parameters

      • Ts extends unknown[]

        types of the items

      Parameters

      Returns ReverseSizedIterable<Ts>

    • Iterates over the Cartesian product of the iterables.

      If no iterables are supplied, a single empty array will be yielded.

      In order to support iterables that can only be iterated over once, an internal copy of each item in the iterable is saved.

      Type Parameters

      • Ts extends unknown[]

        types of the items

      Parameters

      • ...iterables: { [I in string | number | symbol]: ReverseIterable<Ts[I<I>]> }

        the iterables

      Returns ReverseIterable<Ts>

    • Iterates over the Cartesian product of the iterables.

      If no iterables are supplied, a single empty array will be yielded.

      In order to support iterables that can only be iterated over once, an internal copy of each item in the iterable is saved.

      Type Parameters

      • Ts extends unknown[]

        types of the items

      Parameters

      • ...iterables: { [I in string | number | symbol]: SizedIterable<Ts[I<I>]> }

        the iterables

      Returns SizedIterable<Ts>

    • Iterates over the Cartesian product of the iterables.

      If no iterables are supplied, a single empty array will be yielded.

      In order to support iterables that can only be iterated over once, an internal copy of each item in the iterable is saved.

      Type Parameters

      • Ts extends unknown[]

        types of the items

      Parameters

      • ...iterables: { [I in string | number | symbol]: Iterable<Ts[I<I>]> }

        the iterables

      Returns Iterable<Ts>