---
Alexey Yerin caught that the match block was also using println instead
of printfln. Adjusted patch for that.
Sorry for the bad first attempt at a v2, it's been too many years since
I last used a pure git-send-email flow. I forgot what's what.
content/tutorials/introduction.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/content/tutorials/introduction.md b/content/tutorials/introduction.md
index 61ec5fc..bb0bdd4 100644
--- a/content/tutorials/introduction.md
+++ b/content/tutorials/introduction.md
@@ -765,10 +765,10 @@ # TODO: We're going to expand the syntax for tuples later
let x: (str | int | example | void) = "Hello!";
match (x) {
- s: str => fmt::println("x is a str: {}", s);
- i: int => fmt::println("x is an int: {}", i);
- example => fmt::println("x is example"),
- void => fmt::println("x is void"),
+ s: str => fmt::printfln("x is a str: {}", s),
+ i: int => fmt::printfln("x is an int: {}", i),
+ example => fmt::printfln("x is example"),
+ void => fmt::printfln("x is void"),
};
x = example;
@@ -778,7 +778,7 @@ # TODO: We're going to expand the syntax for tuples later
example => -1,
* => abort(),
};
- fmt::println("y is {}", y);
+ fmt::printfln("y is {}", y);
};
details: |
One of the most important features of Hare is **tagged unions**. These are
--
2.31.0