An introduction to functional programming in haskell