@@ -348,7 +348,7 @@ We'll need to be able to create a new ``Surface`` by opening a window:
348348 initWindow : Int -> Int -> ST m Var [add Surface]
349349
350350However, this isn't quite right. It's possible that opening a window
351−will fail, for example if our program is running in a termina without
351+will fail, for example if our program is running in a terminal without
352352a windowing system available. So, somehow, ``initWindow`` needs to cope
353353with the possibility of failure. We can do this by returning a
354354``Maybe Var``, rather than a ``Var``, and only adding the ``Surface``
@@ -657,14 +657,14 @@ resources and merge them into one composite resource. Before we run
657657``combine``, the target resource must exist (``comp`` here) and must be
658658of type ``State ()``.
659659
660−It is instructive to look at the types of ``split`` and combine to see
660+It is instructive to look at the types of ``split`` and ``combine`` to see
661661the requirements on resource lists they work with. The type of ``split``
662662is the following:
663663
664664.. code-block:: idris
665665
666666 split : (lbl : Var) -> {auto prf : InState lbl (Composite vars) res} ->
667− STrans m (VarList vars) res (\ vs => mkRes vs ++ updateRes res prf (State ()))
667+ STrans m (VarList vars) res (\vs => mkRes vs ++ updateRes res prf (State ()))
668668
669669The implicit ``prf`` argument says that the ``lbl`` being split must be
670670a composite resource. It returns a variable list, built from the composite
@@ -713,8 +713,8 @@ A ``Line`` is defined as a start location, and end location, and a colour:
713713 Line : Type
714714 Line = ((Int, Int), (Int, Int), Col)
715715
716−To implement ``start``, which creates a new ``Turtle`` (or returns ``Nothing``)
717−if this is impossible, we begin by initialising the drawing surface then
716+To implement ``start``, which creates a new ``Turtle`` (or returns ``Nothing``
717+if this is impossible), we begin by initialising the drawing surface then
718718all of the components of the state. Finally, we combine all of these
719719into a composite resource for the turtle:
720720