Re: [go-nuts] Shuffle Items in a Slice

2016-06-27 Thread Martin Geisler
On Fri, Jun 24, 2016 at 2:54 PM, Val wrote: > The playground caches everything, so running multiple times the same program > will just serve the previously generated output. Thanks, that's good to know! Makes a lot of sense too. > Also in the playground everything is frozen

Re: [go-nuts] Shuffle Items in a Slice

2016-06-24 Thread dc0d
Thanks Val for explanation & clarification; On Friday, June 24, 2016 at 5:24:30 PM UTC+4:30, Val wrote: > > The playground caches everything, so running multiple times the same > program will just serve the previously generated output. > > Also in the playground everything is frozen at some

Re: [go-nuts] Shuffle Items in a Slice

2016-06-24 Thread Martin Geisler
On Fri, Jun 24, 2016 at 1:05 PM, dc0d wrote: > > Hi; > > To shuffle items in a slice I'm doing this: > > var res []Item > > //fill res logic > > shuffle := make(map[int]*Item) > for k, v := range res { > shuffle[k] = > } > res = nil > for _, v := range shuffle { >