You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/02-development-environments-expressions.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Cloud-native environments are typically based on remote servers. Unlike traditio
26
26
27
27
These servers are provided by different cloud server providers. However, the general setup procedures for a MoonBit development environment remain the same: create or clone a repository, launch the environment, and then install the "MoonBit Language" extension.
28
28
29
-
Advenced users may also install the [command-line tools](https://www.moonbitlang.com/download/) or clone the [cloud-native development template](https://github.com/peter-jerry-ye/moonbit-template). For further guidance, please refer to the [_MoonBit's Build System Tutorial_](https://www.moonbitlang.com/docs/build-system-tutorial/).
29
+
Advanced users may also install the [command-line tools](https://www.moonbitlang.com/download/) or clone the [cloud-native development template](https://github.com/peter-jerry-ye/moonbit-template). For further guidance, please refer to the [_MoonBit's Build System Tutorial_](https://www.moonbitlang.com/docs/build-system-tutorial/).
30
30
31
31
### Local Environment
32
32
@@ -248,7 +248,7 @@ In MoonBit, variable binding can be achieved using the syntax `let <identifier>
248
248
249
249
Rebinding an identifier in MoonBit will result in shadowing the previous value associated with that identifier, rather than modifying it. This means that the new value assigned to the identifier will take precedence over the previous value within the scope where it is rebound.
250
250
251
-
By utilizing variable binding effectively, you can avoid complex nesting of expressions and make their code more readable and maintainable.
251
+
By utilizing variable binding effectively, you can avoid complex nesting of expressions and make the code more readable and maintainable.
252
252
253
253
#### Expression Blocks and Scope
254
254
@@ -352,7 +352,7 @@ let value: Int = {
352
352
}
353
353
```
354
354
355
-
Fanally, we get the value of `value`.
355
+
Finally, we get the value of `value`.
356
356
357
357
```moonbit no-check
358
358
let value: Int = 15
@@ -377,7 +377,7 @@ In MoonBit, conditional expressions are also expressions and can be used within
377
377
-`( if x > y { "x" } else { "y" } ) + " is bigger"`
378
378
-`if 0.1 + 0.2 == 0.3 { "Great!" } else { "C'est la vie :-)" }`
379
379
380
-
The expression blocks in the branches must have the same type, and the type of the entire conditional expression is determined by on the type of the expression blocks in the branches. The type of the condition must be a Boolean.
380
+
Expression blocks in branches must have the same type, and the type of the entire conditional expression is determined by the type of an expression block from these branches. The type of the condition must be a Boolean.
0 commit comments