Returns a Stream that merges elements from both iterables by taking one element from each, passing them to the function, and yielding the result.
Type of items in the first iterable.
Type of items in the second iterable.
Type of items in the result.
The first iterable to merge.
The second iterable to merge.
The function that merges the elements.
A Stream that merges elements from both iterables.
const result = product('ABCD', 'xy', (a, b) => `${a}${b}`);console.log([...result]); // ['Ax', 'Ay', 'Bx', 'By', 'Cx', 'Cy', 'Dx', 'Dy'] Copy
const result = product('ABCD', 'xy', (a, b) => `${a}${b}`);console.log([...result]); // ['Ax', 'Ay', 'Bx', 'By', 'Cx', 'Cy', 'Dx', 'Dy']
Returns a Stream that merges elements from both iterables by taking one element from each, passing them to the function, and yielding the result.