Re: [swift-users] Incorrect Fisher-Yates shuffle in example code

2017-12-16 Thread Nevin Brackett-Rozinsky via swift-users
On Sat, Dec 16, 2017 at 7:37 PM, Daniel Dunbar wrote: > Would you like to post a PR to fix these issues? > > - Daniel > All right, I’ve submitted a PR that I think should work, though I’m not too confident in the pre-Swift-4 parts (credit to swiftdoc.org if the code

Re: [swift-users] Incorrect Fisher-Yates shuffle in example code

2017-12-16 Thread Saagar Jha via swift-users
While we’re still looking at the Fisher-Yates shuffle package, I stumbled upon this definition of random(): public let random: (Int) -> Int = { while true { let x =

Re: [swift-users] Incorrect Fisher-Yates shuffle in example code

2017-12-16 Thread Saagar Jha via swift-users
Saagar Jha > On Dec 16, 2017, at 16:34, Nevin Brackett-Rozinsky via swift-users > wrote: > > The example implementation of the Fisher-Yates shuffle found here >

Re: [swift-users] Incorrect Fisher-Yates shuffle in example code

2017-12-16 Thread Daniel Dunbar via swift-users
Would you like to post a PR to fix these issues? - Daniel > On Dec 16, 2017, at 4:34 PM, Nevin Brackett-Rozinsky via swift-users > wrote: > > The example implementation of the Fisher-Yates shuffle found here >

[swift-users] Incorrect Fisher-Yates shuffle in example code

2017-12-16 Thread Nevin Brackett-Rozinsky via swift-users
The example implementation of the Fisher-Yates shuffle found here on Apple’s GitHub (and linked from swift.org/package-manager) has some problems. Stripping it down to just the Swift 4