This is a work in progress.
Warning! This book is a work in progress. Read at your own risk! Hello there! This is a book that will show you around the Haskell programming language. If you’re not already familiar (or too familiar) with programming in another language, you might need to put in extra work. Don’t be discouraged! While the stu in the beginning may seem extremely boring, mind-blowing things start happening later on.
This book has a lot of footnotes. You don’t have to read them, but sometimes you might gain some insight by doing so. You can click on them to jump to them faster (readers from the website might want to download the book for this reason). You can click on the table of contents as well.
Feel free to jump around the book as well! I’ve added as many links as possible to help you get around to cooler stu if you’re curious about it. I also have short recaps of the important stu as it’s needed so you don’t have to go back and hunt for the particular chapter the concept got introduced in. The writing in this book may not be polished yet, and some things may be missing, but take a look you might just like it!
Your turn! Exercises
At the end of each subsection I will add some exercises in the form of questions, quizzez or whatever. If you’re stuck, as the saying goes, Try HarderTM. I usually go to Google when I’m not sure of something. Don’t be afraid to cheat this way2 but be sure that you learn something from it!
After you’re done with the exercises, read the hints at the end. They often provide additional insight beyond answering the question. Some might explain why we do things one way and not another. Others might give interesting or fun facts about Haskell. Or you might just have found a solution that is completely original and creative!
1.2. Why Haskell?
Every language (human or computer) is unique. But there exists a special breed of languages that challenge and shape the way one thinks. Haskell is one of them lost innovation in a sea of clichés. Unfortunately, the only people apparently interested in Haskell are academics who blindly push the boundaries and gurus who want to learn just one more language.
On a more concrete note, if Haskell were to have a list of prerequisites, it would be very unusual indeed at least two of the following:
- Extensive programming experience
- A background in mathematics
- An inclination toward the abstract
- Perseverance
- Hard work