Skip to content

Commit

Permalink
Final amendments for 2023 course 1
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Dec 17, 2023
1 parent 909e9dc commit ed4c5a3
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions slides/course-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class: center, middle

<br/>

Clément Hurlin
Clément Hurlin, Director of Engineering, Tweag

[https://github.com/smelc/tn-fp-haskell-course]([https://github.com/smelc/tn-fp-haskell-course)

Expand Down Expand Up @@ -84,6 +84,12 @@ Those teams are at the top of their craft 💪
You will learn a lot working there
</center>

???

- Explain why there are many banking systems in here:
- GC okay
- Care about correctness

---

# Why functional programming?
Expand Down Expand Up @@ -125,6 +131,9 @@ Highlight how things are more complicated in Java:

- Need to handle `null`
- Alternative implementations possible: in place change
- Should the result be immutable?

- Discuss different kind of lists

---

Expand Down Expand Up @@ -256,6 +265,7 @@ reverse (x : rest) = (reverse rest) ++ [x] -- Call reverse within reverse
???

- Discuss whether they know map/reduce
- Discuss heap problem/tail call optimization

---

Expand Down Expand Up @@ -326,7 +336,7 @@ Expressions can be freely extracted into variables or substituted (inlined), whi

---

# Defining data structures
# Algebraic Data Types

```hs
data Version =
Expand Down Expand Up @@ -357,7 +367,7 @@ record SemVer(int x, int y, int z) implements Version { }

???

Easy to define new expressions with _algebraic data types_
- Also called _sum_ types

---

Expand Down Expand Up @@ -388,6 +398,13 @@ toString :: Contains a String => a -> String
toString (whatever :: a) = get whatever
```

???

- Explain typeclasses are open abstractions
- You can define them far away from the type's definition
- Ask what's the problem?
- Conflicting definitions are possible

<!--
-- | Generic setter for containers
class With a b where
Expand Down

0 comments on commit ed4c5a3

Please sign in to comment.