Skip to content
carnot edited this page Jun 3, 2011 · 2 revisions

Learn You a Haskell for Great Good!

  1. Introduction
  1. Starting Out
  1. Types and Typeclasses
  1. Syntax in Functions
  1. Recursion
  1. Higher Order Functions
  1. Modules
  1. Making Our Own Types and Typeclasses
  1. Input and Output
  1. Functionally Solving Problems
  1. Functors, Applicative Functors and Monoids
  1. A Fistful of Monads
  1. For a Few Monads More
  1. Zippers

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License because I couldn't find a license with an even longer name.

@Haskell function 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. But then once it just "clicked" and after getting over that initial hurdle, it was pretty much smooth sailing.


source


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.

Clone this wiki locally