diff --git a/src/intro/data-types.md b/src/intro/data-types.md index d8b001b..b54241a 100644 --- a/src/intro/data-types.md +++ b/src/intro/data-types.md @@ -105,7 +105,7 @@ contain constructors that refer to the same data type. For example, a binary tree can be defined as follows. ```fram -data Tree X = +data rec Tree X = | Leaf | Node of Tree, X, Tree ``` @@ -204,9 +204,9 @@ sequence of definitions. ```fram data Vec3D T = Vec3D of { x : T, y : T, z : T } -method x (Vec2D { x }) = x -method y (Vec2D { y }) = y -method z (Vec2D { z }) = z +method x (Vec3D { x }) = x +method y (Vec3D { y }) = y +method z (Vec3D { z }) = z ``` Therefore, records can be used in a similar way as records in other diff --git a/src/ref/lexer.md b/src/ref/lexer.md index 79ccaef..f4e32a1 100644 --- a/src/ref/lexer.md +++ b/src/ref/lexer.md @@ -3,8 +3,8 @@ ## Whitespace The following characters are considered as whitespace (blanks): horizontal tab -(`0x09`), new line (`0x10`), vertical tab (`0x11`), form feed (`0x12`), -carriage return (`0x13`), and space (`0x20`). Whitespace characters are ignored +(`0x09`), new line (`0xA`), vertical tab (`0xB`), form feed (`0xC`), +carriage return (`0xD`), and space (`0x20`). Whitespace characters are ignored by the lexer, but they separate tokens, e.g., identifiers or literals. ## Comments