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 48
Page 121
... Prove the laws : ( xs + ys ) ! i ( xs + ys ) ! i = xs ! i , = if i < #xs xs ! ( i − #xs ) , if i ≥ #xs - for every finite list xs and ys and every natural number i . ( Hint : The second law will be easier to prove if it is rewritten ...
... Prove the laws : ( xs + ys ) ! i ( xs + ys ) ! i = xs ! i , = if i < #xs xs ! ( i − #xs ) , if i ≥ #xs - for every finite list xs and ys and every natural number i . ( Hint : The second law will be easier to prove if it is rewritten ...
Page 129
... Prove that : ( xs + ys ) - —— xs = ys reverse ( xs + ys ) = reverse ys + reverse xs for every finite list zs and ys . 5.4.3 Prove that : foldr f a ( xs + ys ) = foldr f ( foldr f a ys ) xs for every function ƒ , value a , and finite ...
... Prove that : ( xs + ys ) - —— xs = ys reverse ( xs + ys ) = reverse ys + reverse xs for every finite list zs and ys . 5.4.3 Prove that : foldr f a ( xs + ys ) = foldr f ( foldr f a ys ) xs for every function ƒ , value a , and finite ...
Page 238
... prove a relationship between # ( subtrees t ) and size t . 9.1.3 Show that : depth t size t - 1 for all finite binary trees . 9.1.4 Prove that if zs is a list of 2 " values , then there is a unique minimal tree t such that tips t = xs ...
... prove a relationship between # ( subtrees t ) and size t . 9.1.3 Show that : depth t size t - 1 for all finite binary trees . 9.1.4 Prove that if zs is a list of 2 " values , then there is a unique minimal tree t such that tips t = xs ...
Common terms and phrases
abstr algorithm apply argument arithmetic bigit binary search trees binary tree bool btree Chapter char characters compute concat concatenation consider constructors 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 map sqr 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 sequence sneeuq solution sqrt square string structural induction subtree Succ Suppose synthesise take n xs takewhile True unlines variable words write xs ys Zero