Skip to content

Commit

Permalink
Merge pull request #346 from moonbitlang/hongbo/add_warning
Browse files Browse the repository at this point in the history
add a warning where loop always require arguments
  • Loading branch information
bobzhang authored Dec 10, 2024
2 parents cd29192 + 4a4500b commit fb13d05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions next/language/fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,10 @@ A functional loop consumes arguments and returns a value. It is defined using th
:end-before: end for loop 9
```

```{warning}
Currently in `loop exprs { ... }`, `exprs` is nonempty list, while `for { ... }` is accepted for infinite loop.
```

## Iterator

An iterator is an object that traverse through a sequence while providing access
Expand Down

0 comments on commit fb13d05

Please sign in to comment.