I found this section rather dense and difficult to make my way through. Maybe because the concepts are a bit trickier to grasp than what is presented in the earlier parts of the chapter, I felt this could have used some more explaining and examples of some of the concepts that were rather glossed over.
In particular, this paragraph left me scratching my head:
Putting all of this information together, a mutating method is simply a method whose first argument is self, passed in as an inout parameter. Because value types are copied when they are passed, self is actually a copy of the value for nonmutating methods. To make changes, self needs to be declared as inout, and mutating is the way Swift allows you to accomplish that.
I thought this paragraph could have used a lot more explanation and examples. Maybe because it mentions self, whose use in this section is not given much attention. Or maybe because it involves an understanding of the difference between value types and reference types which have not really been covered yet at this point in the book.
Rather than confuse things further by presenting my own understanding of what I think this means, may I ask if anyone else encountered trouble with this section of the book? Or better yet, does anyone feel like they completely grasp all of the ideas presented in this section?