Closed
Description
openedon 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:
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
RFC feature request which has been accepted.Issue or pull request for adding a new feature.A good first issue for new contributors!Issue involves or relates to JavaScript.Request for comments. Feature requests and proposed changes.May require some initial design or R&D, but should be straightforward to resolve and/or implement.Normal priority concern or feature request.