I'm currently using clojure 1.1 and wasn't aware of shuffle in the
contrib libraries.
It felt like a wheel reinvention ... I should have looked harder!
Thank you.
On Wed, Jul 21, 2010 at 12:51 PM, Randy Hudson wrote:
> Clojure 1.2 has a shuffle function. If you're using 1.1, you can just
> cop
Clojure 1.2 has a shuffle function. If you're using 1.1, you can just
cop the 1.2 implementation.
On Jul 21, 1:18 pm, Ryan Waters wrote:
> http://gist.github.com/484747
>
> - - -
>
> My sad little program has a number of issues and I would welcome
> suggestions on any aspect of it. I come from a
On Jul 21, 2010, at 12:44 PM, Michał Marczyk wrote:
> The biggest problem with the code is that it reconstructs the entire
> `ordered-ips` vector minus the last entry picked at each iteration. It
> would be simpler and *much* more performant to do
>
> (shuffle ordered-ips)
>
> Also note that Clo
The biggest problem with the code is that it reconstructs the entire
`ordered-ips` vector minus the last entry picked at each iteration. It
would be simpler and *much* more performant to do
(shuffle ordered-ips)
Also note that Clojure 1.2 provides an `rand-nth` function for doing
(let [i (count
http://gist.github.com/484747
- - -
My sad little program has a number of issues and I would welcome
suggestions on any aspect of it. I come from an imperative
programming background and clojure is my first experience with a
functional or lisp language.
I'd like to take a list of things (really