diff options
Diffstat (limited to 'It is not possible to do a chain assignment.md')
-rw-r--r-- | It is not possible to do a chain assignment.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/It is not possible to do a chain assignment.md b/It is not possible to do a chain assignment.md new file mode 100644 index 0000000..419c5dc --- /dev/null +++ b/It is not possible to do a chain assignment.md @@ -0,0 +1,7 @@ +[[Rust]] +[[Statement vs expression]] + +Because a statement does not have a return value it is not possible to do +`let x = (let y = 6)` + +Also `let x = y = 6;` is not possible because now `y` is never defined.
\ No newline at end of file |