shuffle function is not actually pure functional
Closed this issue ยท 2 comments
djcsdy commented
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.
github-actions commented
๐ This issue has been resolved in version 7.0.0-alpha.1 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐
github-actions commented
๐ This issue has been resolved in version 7.0.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐