Re: functional lazy shuffle

2013-08-23 Thread NeedMoreDesu
I've written vector version. As you can make subvectors really fast, and you can take element at index really fast, I just throw out last element at each iteration. (letfn [(vec-throw-out [v i] (pop (assoc v i (get v (dec (count v))] (defn lazy-shuffle [v] (if (seq v) (let [idx

Re: functional lazy shuffle

2009-01-29 Thread bOR_
Hmm. (time isn't that reliable here. my lazy-shuffle might be quite slow after all. On Jan 26, 10:46 pm, bOR_ wrote: > In addition to the functional shuffle thread (can't seem to post to > that one anymore, might be too old?), I've written alazy shuffle. Not > sure if it is the best way to write