---
content/tutorials/introduction.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/content/tutorials/introduction.md b/content/tutorials/introduction.md
index 61ec5fc..589d8fe 100644
--- a/content/tutorials/introduction.md+++ b/content/tutorials/introduction.md
@@ -765,8 +765,8 @@ # 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);+ 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"),
};
@@ -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
> match (x) {> - s: str => fmt::println("x is a str: {}", s);> - i: int => fmt::println("x is an int: {}", i);> + s: str => fmt::println("x is a str: {}", s),> + i: int => fmt::println("x is an int: {}", i),
These should be changed to printfln too
Alexey Yerin caught that the match block was also using println instead
of printfln. Adjusted patch for that.
---
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
Send a new patch in its own thread, please. You put the context-specific
details in the commit message, too, and they belong in the timely
commentary instead (after the ---)