Skip to content

Instantly share code, notes, and snippets.

@mwmitchell
Created February 3, 2012 19:01
Show Gist options
  • Save mwmitchell/1731776 to your computer and use it in GitHub Desktop.
Save mwmitchell/1731776 to your computer and use it in GitHub Desktop.
fixed randomize / shuffle
(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