Where does the for loop mutate threeToGo?
The for loop does not mutate threeToGo. It goes through each element in the sequence and prints the element.
The while loop generates a syntax error because you made the next function mutating. threeToGo is a let constant so you can't change it or call a mutating function on it.
Topic:
Programming Languages
SubTopic:
Swift
Tags: