We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c222196 commit c83fcefCopy full SHA for c83fcef
src/guide/mutation.md
@@ -40,10 +40,14 @@ count /= 25
40
print(count) // 2
41
```
42
43
-These operators also return the assigned result, so you can use the new value immediately.
+These operators return `void` to help alleviate ambiguity and make code easier to understand—use the name of the binding to get its current value.
44
45
```grain
46
let mut count = 7
47
48
-print(count += 9) // 16
+print(count += 9) // void
49
+
50
+// Instead, use
51
+count += 9
52
+print(count) // 25
53
0 commit comments