
If you say that a is 5, you can't say it's something else later because you just said it was 5. You also can't set a variable to something and then set it to something else later. You express that in the form of functions.
#Haskell letts plus
The factorial of a number is the product of all the numbers from 1 to that number, the sum of a list of numbers is the first number plus the sum of all the other numbers, and so on. In purely functional programming you don't tell the computer what to do as such but rather you tell it what stuff is. You have control flow structures for doing some action several times. For instance, you set variable a to 5 and then do some stuff and then set it to something else. While executing them, it can change state. In imperative languages you get things done by giving the computer a sequence of tasks and then it executes them.

Haskell is a purely functional programming language. Learning Haskell is much like learning to program for the first time - it's fun! It forces you to think differently, which brings us to the next section … I guess what I'm trying to say is: Haskell is great and if you're interested in programming you should really learn it even if it seems weird at first. But then once it just "clicked" and after getting over that initial hurdle, it was pretty much smooth sailing. I failed to learn Haskell approximately 2 times before finally grasping it because it all just seemed too weird to me and I didn't get it. People there are extremely nice, patient and understanding to newbies. The channel #haskell on the freenode network is a great place to ask questions if you're feeling stuck. Although I bet that even if you don't have any significant programming experience, a smart person such as yourself will be able to follow along and learn Haskell. This tutorial is aimed at people who have experience in imperative programming languages (C, C++, Java, Python …) but haven't programmed in a functional language before (Haskell, ML, OCaml …). So this is an attempt at adding another useful resource for learning Haskell so you have a bigger chance of finding one you like. By going through several resources, I was able put together the pieces and it all just came falling into place. The way I learned it was by reading several different tutorials and articles because each explained something in a different way than the other did. When I was starting out in Haskell, I didn't learn from just one resource. There are quite a few tutorials on Haskell floating around on the internet. I decided to write this because I wanted to solidify my own knowledge of Haskell and because I thought I could help people new to Haskell learn it from my perspective. Well, you've come to the right place, but let's talk about this tutorial a bit first. If you're reading this, chances are you want to learn Haskell. Welcome to Learn You a Haskell for Great Good!
