forked from johnfn/johnfn
-
Notifications
You must be signed in to change notification settings - Fork 1
Haskell
sameerg edited this page May 29, 2011
·
1 revision
@Haskell

Notes
- In purely functional programming you don't tell the computer what to do as such but rather you tell it what stuff is[unlike ctrl flowes of imperative cpp types]
- build more complex functions by gluing simple functions together.
Say you have an immutable list of numbers xs = [1,2,3,4,5,6,7,8] and a function doubleMe which multiplies every element by 2 and then returns a new list. If we wanted to multiply our list by 8 in an imperative language and did doubleMe(doubleMe(doubleMe(xs))),
- Haskell is statically typed. When you compile your program, the compiler knows which piece of code is a number, which is a string and so on.