diff --git a/tutorial.txt b/tutorial.txt
index 8bc7e35..f4d1e9f 100644
--- a/tutorial.txt
+++ b/tutorial.txt
@@ -19,7 +19,7 @@ For deeper coverage, look at the [language specification](spec.html) and the
[library reference manual](doc/index.html).
We assume that you are already familiar with programming, and have installed
-Myrddin on your machine already, following the instructions on the
+Myrddin on your machine, following the instructions on the
[Environment Setup](setup.html) page.
A Simple Program
@@ -213,7 +213,7 @@ checked against the value in sequence, and the first one that matches has its
body executed. Here, 7 and 9 are not equal to 11, so their bodies are not
executed. However, a free name matches any value, so matching against `n`
succeeds. Additionally, the free name captures the value that it is being
-matched against, meaning that in the expression `std.put("got {}\n")`, the
+matched against, meaning that in the expression `std.put("got {}\n", n)`, the
variable n evaluates to 11.
This kind of matching can be applied to more than just integers. If `x` was
@@ -229,7 +229,7 @@ Pattern matches can descend into the structure of almost any type. Structures,
arrays, strings, unions, and even values on the other end of pointers are fair
game. Of these, matching on unions is likely to be the most common.
-A union is a type that has two parts: A tag, and a body. The body is optional,
+A union is a type that has two parts: a tag, and a body. The body is optional,
but the tag is always present. We could define a union type as:
type u = union
@@ -244,8 +244,8 @@ as in:
x = `Int 123
-Once a value is in a union, the only way to extract is by applying a
-pattern match to it. The tag is matched on to decide which variant of the
+Once a value is in a union, the only way to extract it is by applying a
+pattern match. The tag is matched on to decide which variant of the
union to extract, and the body is matched using the usual rules. For example:
```{runmyr umatch}
@@ -342,7 +342,7 @@ buffered wrapper around the `std.In` input stream. This buffered reader is
used to efficiently read and decode whole Unicode codepoints.
The main loop of the `wc` program matches over the result of `bio.getc`. The
-std result type is generic, but for our purposes right now we can assume it is
+`std.result` type is generic, but for our purposes right now we can assume it is
defined as:
type std.result = union
@@ -585,10 +585,10 @@ put this into a bld.proj file in the same directory as `main.myr`:
main.myr
;;
-There is one problem that separate bld.proj files and installed libraries does
+There is one problem that separate bld.proj files and installed libraries do
not address. We may want to have the binaries and libraries shipped as part of
the same project, implying that we want to build them all together as a unit.
-To do this, we could put the two build targets into the same `bld.proj`, we
+To do this, we could put the two build targets into the same `bld.proj`,
and add a dependency from `main` to the `stack` library, as below:
lib stack =
@@ -852,7 +852,7 @@ be initialized by this function.
f(a) /* illegal: used before defined */
g(&a) /* ok: assumption that g initializes a */
-Consts are are compile time constants, and are often placed in read only
+Consts are compile time constants, and are often placed in read only
memory by the compiler. Consts must be initialized with an expression that is
computable at compile time. Generics are closely related to constants,
although their type may contain type variables.
@@ -884,7 +884,7 @@ This is strongly discouraged, stylistically.
Literals in Detail
-------------------
-Many values in can be written out directly in code, as literals. Integers,
+Many values can be written out directly in code, as literals. Integers,
characters, strings, arrays, structs, and slices are all examples.
#### Ints
@@ -1008,7 +1008,7 @@ do.
The member lookup operator. Looks up a value from within a
structure or pointer to structure, and evaluates to that
value. As a special case, it also lets you get the length
- of a slice or array using the .len
member. Used as:
+ of a slice or array using the .len
member.
@@ -1105,7 +1105,7 @@ do.
The left shift operator shifts x
right by
+
The right shift operator shifts x
right by
y
bits. Shifting by more than the number of bits
in x
can lead to strange results.