Skip to content

Commit

Permalink
fix #81
Browse files Browse the repository at this point in the history
  • Loading branch information
soupi committed Jan 7, 2024
1 parent e1a0cb6 commit 845144c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/03-html/04-safer_construction.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,19 @@ can help us understand where the types do not match, and then we can figure out
> **Note**: If we use a *parametrically polymorphic* function more than once,
> or use different functions that have similar type variable names,
> the type variables don't have to match in all instances simply because they share a name.
> Each instance has its own unique set of type variables. For example:
> Each instance has its own unique set of type variables.
> For example, consider the following snippet:
>
> ```hs
> incrementChar :: Char -> Char
> incrementChar c = chr (ord (id c) + id 1)
> ```
> where the types for the functions we use are:
>
> ```hs
> id :: a -> a
> ord :: Char -> Int
> chr :: Int -> Char
>
> incrementChar :: Char -> Char
> incrementChar c = chr (ord (id c) + id 1)
> ```
>
> In the snippet above, we use `id` twice (for no good reason other than for demonstration purposes).
Expand Down

0 comments on commit 845144c

Please sign in to comment.