Skip to content

[RFC]: add @stdlib/array/base/take-map #1321

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

Closed
3 tasks done
kgryte opened this issue Feb 21, 2024 · 1 comment · Fixed by #1349
Closed
3 tasks done

[RFC]: add @stdlib/array/base/take-map #1321

kgryte opened this issue Feb 21, 2024 · 1 comment · Fixed by #1349
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: Low Low priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. Utilities Issue or pull request concerning general utilities.

Comments

@kgryte
Copy link
Member

kgryte commented Feb 21, 2024

Description

This RFC proposes adding the package @stdlib/array/base/take-map.

The package should be structured similarly to @stdlib/array/base/take.

The package should expose an API having the same signature as take, with the addition of clbk and thisArg arguments.

function takeMap( x, indices, mode, clbk[, thisArg] ) {...}

The callback function should map each selected value specified by indices to the output value.

In short, this package combines take and map into a single API call.

Package: @stdlib/array/base/take-map
Alias: takeMap

Related Issues

None.

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:.
@kgryte kgryte added RFC Request for comments. Feature requests and proposed changes. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! labels Feb 21, 2024
@kgryte kgryte changed the title [RFC]: add @stdlib/array/base/take-by [RFC]: add @stdlib/array/base/take-map Feb 21, 2024
@vr-varad
Copy link
Contributor

#1349 solved

@kgryte kgryte added priority: Low Low 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. Accepted RFC feature request which has been accepted. Utilities Issue or pull request concerning general utilities. labels Feb 23, 2024
Planeshifter added a commit that referenced this issue Mar 6, 2024
PR-URL: #1349
Closes: #1321

---------

Signed-off-by: Philipp Burckhardt <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]>
Reviewed-by: Athan Reines <[email protected]>
Reviewed-by: Pranav Goswami <[email protected]>
Reviewed-by: Philipp Burckhardt <[email protected]>
bad-in-coding pushed a commit to bad-in-coding/stdlib that referenced this issue Mar 7, 2024
PR-URL: stdlib-js#1349
Closes: stdlib-js#1321

---------

Signed-off-by: Philipp Burckhardt <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]>
Reviewed-by: Athan Reines <[email protected]>
Reviewed-by: Pranav Goswami <[email protected]>
Reviewed-by: Philipp Burckhardt <[email protected]>
nishant-s7 pushed a commit to nishant-s7/stdlib that referenced this issue Mar 7, 2024
PR-URL: stdlib-js#1349
Closes: stdlib-js#1321

---------

Signed-off-by: Philipp Burckhardt <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]>
Reviewed-by: Athan Reines <[email protected]>
Reviewed-by: Pranav Goswami <[email protected]>
Reviewed-by: Philipp Burckhardt <[email protected]>
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: Low Low priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. Utilities Issue or pull request concerning general utilities.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants