Introduction to Functional ProgrammingThis is a thorough introduction to the fundamental concepts of functional programming.The book clearly expounds the construction of functional programming as a process of mathematical calculation, but restricts itself to the mathematics relevant to actual program construction. It covers simple and abstract datatypes, numbers, lists, examples, trees, and efficiency. It includes a simple, yet coherent treatment of the Haskell class; a calculus of time complexity; and new coverage of monadic input-output. |
From inside the book
Results 1-3 of 23
Page 43
... position , and moves to a new position as indicated by the angle and distance . We can introduce type synonyms for these values as follows : position == angle == ( num , num ) num distance == num Notice the special symbol == used in the ...
... position , and moves to a new position as indicated by the angle and distance . We can introduce type synonyms for these values as follows : position == angle == ( num , num ) num distance == num Notice the special symbol == used in the ...
Page 58
... position such that ( position xs x ) returns the position of the first occurrence of x in zs ( counting from 0 ) , and −1 if x does not appear in rs . Thus position has type : position :: [ a ] a → num » This is an instructive problem ...
... position such that ( position xs x ) returns the position of the first occurrence of x in zs ( counting from 0 ) , and −1 if x does not appear in rs . Thus position has type : position :: [ a ] a → num » This is an instructive problem ...
Page 272
... position is worth w to one player , then it is worth ( -w ) to the other player . Such games are called zero - sum games because the sum of the worths to each player of any position is always zero ; in particular , when one player wins ...
... position is worth w to one player , then it is worth ( -w ) to the other player . Such games are called zero - sum games because the sum of the worths to each player of any position is always zero ; in particular , when one player wins ...
Common terms and phrases
abstr aexp algorithm apply argument arithmetic bigit binary search trees binary tree bool btree Chapter char characters compute concat concatenation consider curry define a function delete denotes dropwhile efficient Eight Queens problem element empty equation evaluation example Exercises expression False filter finite foldl foldr Functional composition functional programming given graph reduction implementation induction infinite list init insert insertion sort integers iterate labels t2 length lines list comprehension list zs lookup map f mapbtree mathematical merge sort minimax mkarray natural numbers Node non-empty list notation operations otherwise outermost reduction pair position problem proof prove queens quicksort recursive definition reduction steps representation represented result returns reverse xs sequence sneeuq solution square string structural induction subtree Succ Suppose synthesise take n xs takewhile True unlines variable words write xs ys Zero