Skip to content

Commit

Permalink
Updated Chapter 15 for Swift 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Carroll committed Oct 7, 2017
1 parent bfd546d commit 4f06e8d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ var philosopherNames = ["b", "c", "d", "e"]
let firstPhilosopher = PhilosopherOp(name: "a", left: forks[0], right: forks.last!)
var philosophers = [firstPhilosopher]

for (i, name) in philosopherNames.enumerated() {
for (i, _) in philosopherNames.enumerated() {
let philosopher = PhilosopherOp(name: philosopherNames[i], left: forks[i + 1], right: forks[i])
philosophers.append(philosopher)
}
Expand Down

0 comments on commit 4f06e8d

Please sign in to comment.