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/cuevery #2332

Closed
3 tasks done
kgryte opened this issue Jun 8, 2024 · 7 comments · Fixed by #2955
Closed
3 tasks done

[RFC]: add @stdlib/iter/cuevery #2332

kgryte opened this issue Jun 8, 2024 · 7 comments · Fixed by #2955
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/cuevery, which cumulatively tests whether every 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( [ true, true, true, false, true ] );

var it = iterCuEvery( arr );

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

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

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

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

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

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

Related Issues

No.

Questions

No.

Other

  • See also @stdlib/iter/every

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

@kgryte
Copy link
Member Author

kgryte commented Jun 25, 2024

Sounds good! Thanks for volunteering to work on this, @RidamGarg!

@Dipti0704
Copy link

i would liketo work on this issue kindly assign this to me

@RidamGarg RidamGarg removed their assignment Jul 17, 2024
@RidamGarg
Copy link
Contributor

@kgryte please assign it to @Dipti0704 not getting much time to work on this. Thank You!

@kgryte
Copy link
Member Author

kgryte commented Jul 17, 2024

Done. @Dipti0704 Please feel free to submit a PR implementing this feature.

@Dipti0704
Copy link

thanks for assigning.. i will soon raise a pr sir

@adityacodes30
Copy link
Contributor

adityacodes30 commented Sep 27, 2024

i am working on this will pr in ~24h

adityacodes30 added a commit to adityacodes30/stdlib that referenced this issue Sep 27, 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

Successfully merging a pull request may close this issue.

4 participants