softwareventures/array

shuffle function is not actually pure functional

Closed this issue ยท 2 comments

The shuffle function is not pure functional, it's stateful by definition and by design.

Two calls to shuffle(x) with the same parameter x may by design return different results, so it's not referentially transparent.

I'm not sure what I was thinking here. It's useful but flies in the face of the principles of this library.

It would be possible to take a PRNG state as an argument to regain referential transparency but I'm not sure I really want to do that here.

๐ŸŽ‰ This issue has been resolved in version 7.0.0-alpha.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

๐ŸŽ‰ This issue has been resolved in version 7.0.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€