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

random: toShuffled #6320

Open
mfulton26 opened this issue Jan 1, 2025 · 0 comments
Open

random: toShuffled #6320

mfulton26 opened this issue Jan 1, 2025 · 0 comments

Comments

@mfulton26
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I thought a shuffle method would update an array in place.

Describe the solution you'd like

Two methods: shuffle and toShuffled (similar to built in methods reverse and toReversed, sort and toSorted, etc.): one for updating the array in place and the other for returning a new array.

Describe alternatives you've considered

Extracting the implementation and maintaining my own in-place shuffle method. That would not be ideal though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant