@@ -38,21 +38,21 @@ Tagged unions can only be created using their constructors, and deconstructed th
39For example::
39For example::
41− data Foo a = Foo | Bar String
41+ data Foo = Foo | Bar String
43 runFoo Foo = "It's a Foo"
43 runFoo Foo = "It's a Foo"
44 runFoo (Bar s) = "It's a Bar. The string is " ++ s
44 runFoo (Bar s) = "It's a Bar. The string is " ++ s
46 test = runFoo Foo ++ runFoo (Bar "Test")
46 test = runFoo Foo ++ runFoo (Bar "Test")
48−In the example, Foo is a tagged union type which has two constructors. It's first constructor ``Foo`` takes no argument, and it's second ``Bar`` takes one, which must be a String.
48+In the example, Foo is a tagged union type which has two constructors. Its first constructor ``Foo`` takes no arguments, and its second ``Bar`` takes one, which must be a String.
50``runFoo`` is an example of pattern matching on a tagged union type to discover its constructor, and the last line shows how to construct values of type ``Foo``.
50``runFoo`` is an example of pattern matching on a tagged union type to discover its constructor, and the last line shows how to construct values of type ``Foo``.
55−Newtypes are like data types introduced with the ``data`` keyword, but are restricted to a single contructor which contains a single arguments. Newtypes are introduced with the ``newtype`` keyword::
55+Newtypes are like data types introduced with the ``data`` keyword, but are restricted to a single contructor which contains a single argument. Newtypes are introduced with the ``newtype`` keyword::
57 newtype Percentage = Percentage Number
57 newtype Percentage = Percentage Number