Skip to content

random: toShuffled #6320

@mfulton26

Description

@mfulton26

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions