introduction to computation: haskell, logic and automata pdf