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 60
Page 60
... xs and ys . We also have : ( xs + ys ) - —— Is = ys tl xs = TS drop n xs = —— - [ hd xs ] take n xs —— Using list - difference , we can define the condition that one list is a permutation of another list : permutation as ys = ( xs —— ys ...
... xs and ys . We also have : ( xs + ys ) - —— Is = ys tl xs = TS drop n xs = —— - [ hd xs ] take n xs —— Using list - difference , we can define the condition that one list is a permutation of another list : permutation as ys = ( xs —— ys ...
Page 82
... xs ys = foldl1 ( ) ( psums xs ys ) 4.2.4 Quotient and remainder Finally , we turn to the problem of division . As every schoolchild knows , di- vision is the hardest of the arithmetic operations to get right since it involves a certain ...
... xs ys = foldl1 ( ) ( psums xs ys ) 4.2.4 Quotient and remainder Finally , we turn to the problem of division . As every schoolchild knows , di- vision is the hardest of the arithmetic operations to get right since it involves a certain ...
Page 83
... xs < #ys , then the new quotient is 0 and the new remainder is xs . Hence : astep xs ys = ( 0 , xs ) Next , consider bstep . If #rs = #ys , then the new quotient q might be any value in the range 0 g < b . However , we shall see that ...
... xs < #ys , then the new quotient is 0 and the new remainder is xs . Hence : astep xs ys = ( 0 , xs ) Next , consider bstep . If #rs = #ys , then the new quotient q might be any value in the range 0 g < b . However , we shall see that ...
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