-
-
Notifications
You must be signed in to change notification settings - Fork 870
Closed
Labels
AcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.FeatureIssue or pull request for adding a new feature.Issue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!A good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.Issue involves or relates to JavaScript.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.Normal priority concern or feature request.
Description
Description
This RFC proposes adding the package @stdlib/array/base/cusome
, which cumulatively tests whether at least n
array elements in a provided array are truthy. The function should return a new generic array. The package should also provide an #assign
API for setting output values in a provided output array.
var x = [ false, false, false, true, true ];
var y1 = cusome( x, 2 );
// returns [ false, false, false, false, true ]
var y2 = [ false, null, false, null, false, null, false, null, false, null ];
var out = cusome.assign( x, 2, y2, 2, 0 );
// returns [ false, null, false, null, false, null, false, null, true, null ]
where the assign
API supports an offset and stride (see, e.g., @stdlib/array/base/take
).
Both APIs should support accessor arrays (see, e.g., @stdlib/array/base/take
).
Related Issues
No.
Questions
No.
Other
No.
Checklist
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:
.
Metadata
Metadata
Assignees
Labels
AcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.FeatureIssue or pull request for adding a new feature.Issue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!A good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.Issue involves or relates to JavaScript.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.Normal priority concern or feature request.