Update code sample for chapter 9.

I updated to the new vector syntax. I also fixed mutable assignments.