Skip to content

Commit

Permalink
fix links; lec 11 example
Browse files Browse the repository at this point in the history
  • Loading branch information
nmheim committed May 2, 2024
1 parent 6ea27de commit 01b97f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions homework/hw04.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ $\lambda$-expression that your evaluator can evaluate.
Your solution should follow Lecture 11, where I show how to create a
type constructor `Parser`
and make it into an instance of `Monad`.
Create a module `Parser.hs` containing the code from [Parser module section](#parser-module)
that you import into your solution.
Create a module [`Parser.hs`](https://github.com/aicenter/FUP/blob/main/lectures/Parser.hs) that you import into your solution.

The parser should be implemented as a Haskell module called `Hw4`.
Note the capital `H`. The
Expand All @@ -30,7 +29,7 @@ import Hw3
```

There are four imports. The first two necessary libraries so that the definitions from
Lecture 11 work. The third is the module `Parser` whose code is [here](#parser-module).
Lecture 11 work. The third is the module `Parser` whose code is [here](https://github.com/aicenter/FUP/blob/main/lectures/Parser.hs).
The last import is your previous homework assignment. So be sure that you have
your `Hw3.hs`
and `Parser.hs`
Expand Down
1 change: 1 addition & 0 deletions lectures/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ We discuss some more examples of type classes, most importantly `Functor`s.

[Slides](https://github.com/aicenter/FUP/blob/main/lectures/lecture11.pdf).
[Log](https://github.com/aicenter/FUP/blob/main/lectures/lecture11.hs).
[`Parser.hs`](https://github.com/aicenter/FUP/blob/main/lectures/Parser.hs).


## Old recorded lectures
Expand Down
2 changes: 1 addition & 1 deletion lectures/lecture11.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ instance Monad Parser where
𝝺> parse (item >>= \c -> if c == 'a' then item else return ' ') "abc"
Just ('b', "c")

𝝺> parse (item >>= \c -> if c == 'a' then item else return ' ') "abc"
𝝺> parse (item >>= \c -> if c == 'a' then item else return ' ') "bbc"
Just (' ', "bc")
```

Expand Down

0 comments on commit 01b97f7

Please sign in to comment.