Skip to content

Add shuffle function #21

@mjepronk

Description

@mjepronk

I think there is not yet a shuffle function in a general purpose library (I did find one in quickcheck, but it uses the Gen monad). I'm thinking something like this:

shuffle :: Array a -> Effect (Array a)

Would it make sense to add it here? Would you like a PR (it might add some dependencies though, notably purescript-arrays)? I think a basic implementation using the Yates-Fisher algorithm in the ST monad would be the most performant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs more infoThis issue needs more info before any action can be done.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions