### Basics of Haskell

As of March 2020, School of Haskell has been switched to read-only mode.

A gentle introduction to Haskell for beginners.

The prerequisite for this series of tutorials is some knowledge of imperative programming, whether C++, Java, Pascal, you name it. If you have some familiarity with functional programming, that's even better.

Since I came from an imperative background -- I can write some mean C++ code -- I'm familiar with the potential obstacles in embracing Haskell. There are many myths about functional programming, and Haskell in particular, that have no basis in reality. I will try to dispel them.

One such myth is that you have to know advanced mathematics (category theory in particular) to be a good Haskell programmer. This is not true, and you'll find no high math in this series of tutorials.

Another myth is that you can't do imperative programming in Haskell. This is technically true, in the sense that Haskell is able to reduce all imperative programming to pure functions, but in practice Haskell is the best imperative language that there is. For instance, it gives you full control over side effects. This is a nice thing in general, but it's a real life saver once you decide to write concurrent or parallel programs. In fact I was virtually pushed into functional programming by the necessities of concurrency. If the term "data race" is familiar to you, I don't need to convince you any more.

• #### 1. Calling functions27 Mar 2013Bartosz Milewski

Basic function call syntax. Without it you can't read any Haskell program.
• #### 2. My First Program28 Dec 2013Bartosz Milewski

Defining simple functions
• #### 3. Pure Functions, Laziness, I/O, and Monads25 Dec 2014Bartosz Milewski

Enough about monads to get you going
• #### 3.a The Tao of Monad27 Dec 2013Bartosz Milewski

An alternative take on monads
• #### 4. Symbolic Calculator: Recursion19 Jun 2013Bartosz Milewski

Starting the first Haskell project. Function types. Recursive functions.
• #### 5. Tokenizer: Data Types26 Jun 2013Bartosz Milewski

Defining data types, working with lists.
• #### 6. Tokenizer: Function Types 2 Oct 2013Bartosz Milewski

Currying, guards.
• #### 7. Tokenizer: Higher Order Functions 2 Jul 2013Bartosz Milewski

Functions that take functions as arguments, anonymous functions, map, filter, and fold.
• #### 8. Parser28 Dec 2014Bartosz Milewski

Top-down recursive parser, dealing with state, case/of clause
• #### 9. Evaluator24 Aug 2013Bartosz Milewski

Data.Map, Maybe, module system, expression problem.
• #### 10. Error Handling 5 Mar 2015Bartosz Milewski

Either monad, typeclasses
• #### 11. State Monad25 Dec 2014Bartosz Milewski

A monad to encapsulate state manipulation.
• #### 12. The List Monad25 Dec 2014Bartosz Milewski

Non-deterministic computations, list comprehensions