Skip to content

feat: add iter/cartesian-product - #16497

Open
harsh-thakkar7 wants to merge 1 commit into
stdlib-js:developfrom
harsh-thakkar7:feat/iter-cartesian-product
Open

harsh-thakkar7 wants to merge 1 commit into
stdlib-js:developfrom
harsh-thakkar7:feat/iter-cartesian-product

Conversation

@harsh-thakkar7

Copy link
Copy Markdown
Contributor

Resolves #1335

Description

What is the purpose of this pull request?

This pull request adds @stdlib/iter/cartesian-product, an iterator which lazily iterates over the Cartesian product of two array-like objects.

The implementation follows the ordering and empty-input semantics of @stdlib/array/cartesian-product and supports generic, typed, and accessor arrays. Elements are read lazily, so large Cartesian products are not materialized up front. The package includes unit tests, documentation, REPL examples, TypeScript declarations, examples, and benchmarks.

Related Issues

Does this pull request have any related issues?

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Equivalence with @stdlib/array/cartesian-product was checked exhaustively for small inputs. All package tests pass locally.

Checklist

Please ensure that the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@harsh-thakkar7
harsh-thakkar7 requested a review from a team November 4, 2026 17:24
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Nov 4, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
iter/cartesian-product $\\color{green}206/206$
$\\color{green}+100.00\\%$
$\\color{green}18/18$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}206/206$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add @stdlib/iter/cartesian-product

2 participants