Created
February 3, 2012 19:01
-
-
Save mwmitchell/1731776 to your computer and use it in GitHub Desktop.
fixed randomize / shuffle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn fixed-shuffle [coll num] | |
(let [l (java.util.ArrayList. coll)] | |
(java.util.Collections/shuffle l (java.util.Random. num)) | |
(seq l))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment