Skip to content

Commit 75bc751

Browse files
phalethskylee03
andauthored
fix: typo in Chapter 2 (#26)
* fix: typo in Chapter 2 * fix: typo in Chapter 2 * fix: typo in Chapter 2 * fix: confusing sentence in Chapter 2 --------- Co-authored-by: skylee03 <[email protected]>
1 parent e9e8ced commit 75bc751

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/02-development-environments-expressions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Cloud-native environments are typically based on remote servers. Unlike traditio
2626

2727
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.
2828

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/).
3030

3131
### Local Environment
3232

@@ -248,7 +248,7 @@ In MoonBit, variable binding can be achieved using the syntax `let <identifier>
248248

249249
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.
250250

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.
252252

253253
#### Expression Blocks and Scope
254254

@@ -352,7 +352,7 @@ let value: Int = {
352352
}
353353
```
354354

355-
Fanally, we get the value of `value`.
355+
Finally, we get the value of `value`.
356356

357357
```moonbit no-check
358358
let value: Int = 15
@@ -377,7 +377,7 @@ In MoonBit, conditional expressions are also expressions and can be used within
377377
- `( if x > y { "x" } else { "y" } ) + " is bigger"`
378378
- `if 0.1 + 0.2 == 0.3 { "Great!" } else { "C'est la vie :-)" }`
379379

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.
381381

382382
![](/pics/if-else-then.drawio.webp)
383383

0 commit comments

Comments
 (0)