Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 45e1cca

Browse files
committed
typo fixed
1 parent 88ac573 commit 45e1cca

File tree

1 file changed

+1
-1
lines changed
  • Classic Computer Science Problems in Swift.playground/Pages/Chapter 7.xcplaygroundpage

1 file changed

+1
-1
lines changed

‎Classic Computer Science Problems in Swift.playground/Pages/Chapter 7.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension Array {
3030
if count < 2 { return shuffledArray } // already shuffled
3131
for i in (1..<count).reversed() { // count backwards
3232
let position = Int(arc4random_uniform(UInt32(i + 1))) // random to swap
33-
if i != position { // swap with the end, don't bother with selp swaps
33+
if i != position { // swap with the end, don't bother with self swaps
3434
shuffledArray.swapAt(i, position)
3535
}
3636
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /