Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
CAIMEOX authored and bobzhang committed Mar 21, 2024
1 parent 447ce90 commit 6165200
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Overview

List is implemented as a **linked list**, supporting O(1) head access.
- Moonbit list is **homogenous** list, which means all elements in the list must be of the same type.
- Moonbit list is **homogeneous** list, which means all elements in the list must be of the same type.
- Moonbit list does not support random access well, you can only access elements by iterating through the list. If you need randomly access the nth element, you should use `Vec` instead.

## Usage
Expand All @@ -26,7 +26,7 @@ Build a repeated list by using the `repeat()` method:
let list = repeat(3, 1) // List::[1, 1, 1]
```

### Patten matching
### Pattern matching
You can use pattern matching to destructure a list:
```moonbit
let list = List::[1, 2, 3, 4, 5]
Expand Down

0 comments on commit 6165200

Please sign in to comment.