Unexpected change of field value in struct

It’s the very first subsection of the “Functions” chapter.

Basically, this thread seems to be an instance of the common assignment vs. mutation confusion, since argument passing is effectively just assignment.

2 Likes