-
Notifications
You must be signed in to change notification settings - Fork 106
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
added Bat{List|Array}.shuffle #718
Conversation
heavily inspired by the in-place array shuffle that was found in BatRandom before
You should try to install the resulting version of (You can update pull-requests by just doing |
I am testing it; I think the experience in the toplevel is not what people want. |
(The failure model I had in mind was not toplevel-specific: if I remember correctly from my own BatConcreteQueue mistakes, compiling a program using Batteries fails at link-time if the |
…om state if no random state was given.
I changed the semantic and ocamldoc strings. |
I am not convinced by the change: why change away from optional arguments again, is there a good reason for this? I think the change you want to make is just turning
into
Edit: I thought the issue was that the default value would not be evaluated on each function call, but in fact it does. So the recommendation in this message is useless as the two programs are equivalent. |
In case no random state was provided, several successive calls to shuffle should move the global |
What I describe is also the behavior I observed in Core.List.permute. |
other proposal there: #720 |
done by 3c3bc7d |
No description provided.