Day 30
October 2, 2018
Day 30
Functional Programming Pt.2
Today I completed chapters 2 and 3 of the first principles in Haskell book and even though it’s slow (on page 118 of 1200) I’m really being encouraged to fully understand the language. The author makes you debug code and implores you to investigate the possible quirks in the language; other books I’ve read just tell you the syntax and leaves little to be discerned by yourself. The book is also very interactive and makes you write both script and REPL code to get use to and understand the different applications of both.
Things I’ve learnt today:
- A big thing I’ve learnt today is that it is easier to avoid bugs by using ‘space’ indentation rather than ‘Tab’. Tab kept on breaking my code.
- The Haskell REPL has a rather intuitive way of querying expressions by using ‘:type’.
- The concept of precedence
- The difference between local and Top-level bindings/declarations and how ‘Let… in’ and ‘where’ are used to embed local bindings within a function.
- Learnt various ways to concatenate expressions and perform list functions.
Next, Data types…