Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC]: add @stdlib/iter/cuany #2331

Closed
3 tasks done
kgryte opened this issue Jun 8, 2024 · 3 comments
Closed
3 tasks done

[RFC]: add @stdlib/iter/cuany #2331

kgryte opened this issue Jun 8, 2024 · 3 comments
Assignees
Labels
Accepted RFC feature request which has been accepted. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! JavaScript Issue involves or relates to JavaScript. priority: Normal Normal priority concern or feature request. RFC Request for comments. Feature requests and proposed changes.

Comments

@kgryte
Copy link
Member

kgryte commented Jun 8, 2024

Description

This RFC proposes adding the package @stdlib/iter/cuany, which cumulatively tests whether at least one iterated value is truthy. The function should be a transform iterator, continuing to iterate while source iterator values are available.

var array2iterator = require( '@stdlib/array/to-iterator' );

var arr = array2iterator( [ false, false, false, true, false ] );

var it = iterCuAny( arr );

var v = it.next().value;
// returns false

v = it.next().value;
// returns false

v = it.next().value;
// returns false

v = it.next().value;
// returns true

v = it.next().value;
// returns true

var bool = it.next().done;
// returns true

Related Issues

No.

Questions

No.

Other

  • See also @stdlib/iter/any

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.
@kgryte kgryte added RFC Request for comments. Feature requests and proposed changes. Feature Issue or pull request for adding a new feature. Accepted RFC feature request which has been accepted. Good First Issue A good first issue for new contributors! priority: Normal Normal priority concern or feature request. JavaScript Issue involves or relates to JavaScript. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. labels Jun 8, 2024
@RidamGarg
Copy link
Contributor

I'd like to work on this. @kgryte

@Jaysukh-409
Copy link
Member

@RidamGarg Thanks for volunteering yourself. I am assigning this to you. Go ahead and submit PR as required.

@RidamGarg
Copy link
Contributor

Generated The PR #2440. Please review it once

@RidamGarg RidamGarg mentioned this issue Jun 24, 2024
1 task
@kgryte kgryte closed this as completed in d07da86 Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted RFC feature request which has been accepted. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! JavaScript Issue involves or relates to JavaScript. priority: Normal Normal priority concern or feature request. RFC Request for comments. Feature requests and proposed changes.
Projects
None yet
Development

No branches or pull requests

3 participants