3 ms·
We get it, we do. Still, even in your example r1 etc. do in fact look "as if they were mutable".
by Koshkin 4y ago
We get it, we do. Still, even in your example r1 etc. do in fact look "as if they were mutable".
- deleted 4y ago[deleted]
- nightski 4y agoIf you were mutating a variable then you'd probably be using the same variable, but in this case you cannot do that. Not trying to be argumentative just saying when you have to store the result in a completely different variable I don't see how that could be considered to look like mutation.
- sudosysgen 4y agoNobody here is saying that they are actually mutable. I am saying that it looks as if you are mutating a new variable and then returning it. It looks like mutation because you are "do-ing" stuff. The mutation that is almost happening is in the monadic state.