Sunday, October 19, 2014

Haskell - Expressions, Basic Types, Composite Data Types

Every expression and function in Haskell has a type.
Types in Haskell are:
  1. Strong
  2. Static
  3. Can be automatically inferred.
  • True has the type Bool
  • 'foo' is of type String
  • 1 has type Num
Type are important for abstraction. To add meaning to some bytes. The meaning cannot change after the type has been defined. 
The benefit is that you can ignore or forget about the low level details.