Skip to content

Commit

Permalink
chore: fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: renshuncui <[email protected]>
  • Loading branch information
renshuncui committed Jul 24, 2024
1 parent 3004cf5 commit ed8cf17
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion book/src/programmability/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ as a list of unique IDs or addresses.
{{#include ../../../packages/samples/sources/programmability/collections.move:vec_set}}
```

VecSet will fail on attempt to insert a an item that already exists in the set.
VecSet will fail on attempt to insert an item that already exists in the set.

## VecMap

Expand Down
2 changes: 1 addition & 1 deletion reference/src/control-flow/pattern-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public struct MyStruct2 {
fun wild_match(x: MyStruct) {
match (x) {
MyStruct(.., 1) => 1,
// OK! The `..` pattern can be used at the begining of the constructor pattern
// OK! The `..` pattern can be used at the beginning of the constructor pattern
MyStruct(1, ..) => 2,
// OK! The `..` pattern can be used at the end of the constructor pattern
MyStruct(1, .., 1) => 3,
Expand Down
4 changes: 2 additions & 2 deletions reference/src/functions/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ substituted at each usage.
## Lambdas

Lambdas are a new type of expression that can only be used with `macro`s. These are used to pass
code from the caller into the body of the `macro`. While the substition is done at compile time,
code from the caller into the body of the `macro`. While the substitution is done at compile time,
they are used similarly to [anonymous functions](https://en.wikipedia.org/wiki/Anonymous_function),
[lambdas](https://en.wikipedia.org/wiki/Lambda_calculus), or
[closures](<https://en.wikipedia.org/wiki/Closure_(computer_programming)>) in other languages.
Expand Down Expand Up @@ -151,7 +151,7 @@ macro fun call_foo<$T, $U>($x: $T): &$U {
}
```

This macro will only expand succesfully if `$T` has a method `foo` that returns a reference `&$U`.
This macro will only expand successfully if `$T` has a method `foo` that returns a reference `&$U`.
As described in the [hygiene](#hygiene) section, `foo` will be resolved based on the scope where
`call_foo` was defined--not where it was expanded.

Expand Down

0 comments on commit ed8cf17

Please sign in to comment.