Mutable to Immutable
We'll cover the following...
We'll cover the following...
Does the following program compile?
It sure does! We only read from the immutable reference, x, and therefore everything is fine. How about this program?
Yes, this is fine as well. We have a mutable reference, x, which allows both reading and writing values. ...