~sircmpwn/harelang.org

67b9f69720cc052b2e85792c1f578c66b7827caa — Sebastian LaVine 16 days ago 52cd112
blog: fix for-each-loops printfln calls
1 files changed, 3 insertions(+), 3 deletions(-)

M content/blog/2024-04-01-Introducing-for-each-loops-in-Hare.md
M content/blog/2024-04-01-Introducing-for-each-loops-in-Hare.md => content/blog/2024-04-01-Introducing-for-each-loops-in-Hare.md +3 -3
@@ 41,7 41,7 @@ it has been implemented using `for (true)` and `match`:
```hare
for (true) match (bufio::read_line(file)!) {
case let line: []u8 =>
	fmt::printfln("{}" strings::fromutf8(line)!)!;
	fmt::printfln("{}", strings::fromutf8(line)!)!;
case io::EOF =>
	break;
};


@@ 52,7 52,7 @@ better. Here is what that could look like:

```hare
foreach (line = bufio::read_line(file)!) {
	fmt::printfln("{}" strings::fromutf8(line)!)!;
	fmt::printfln("{}", strings::fromutf8(line)!)!;
};
```



@@ 99,7 99,7 @@ up with:

```hare
for (let line => bufio::read_line(file)!) {
	fmt::printfln("{}" strings::fromutf8(line)!)!;
	fmt::printfln("{}", strings::fromutf8(line)!)!;
};
```