Not sure if there's a built-in one, but I had a lot of fun coming up
with this one:

(defn shuffle [coll]
   (map second (sort (map (fn [x] [(rand) x]) coll))))

Now I'm looking forward to hearing how I could have done it
better...the real fun on this list, since Clojure has so many ways to
amaze!

On Mon, Dec 1, 2008 at 11:28 PM, Brian Doyle <[EMAIL PROTECTED]> wrote:
> Is there a function that takes a collection and randomizes, or shuffles, the
> items?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to