Richard Bird's Introduction to Functional Programming (Prentice Hall PDF

By Richard Bird

ISBN-10: 0134841891

ISBN-13: 9780134841892

Overseas model. similar content material. See photograph of booklet.

Show description

Read or Download Introduction to Functional Programming (Prentice Hall International Series in Computing Science) PDF

Similar introductory & beginning books

Richard C. Detmer's Introduction to 80X86 Assembly Language and Computer PDF

A working laptop or computer could be considered from many various degrees, and used for lots of diversified capabilities, comparable to the construction of recent program software program. despite the fact that, a precise computing device works at a good decrease point than this. creation to 80x86 meeting Language and computing device structure divides its emphasis among the assembly-language/machine-language point of laptop operations and the architectural point, that's, the extent outlined by means of the computing device directions that the processor can execute.

Download e-book for iPad: Ruby Programming by Jr. Jerry Lee Ford

Ruby is a unfastened and strong programming language that may be used to strengthen courses to fulfill approximately any programming problem, together with scripting, program programming and internet improvement. This new textual content teaches Ruby programming via a full of life hands-on process and a spotlight on video game improvement. scholars commence through studying the basics of desktop programming and may flow directly to gaining knowledge of the techniques and ideas eager about Ruby programming.

Additional resources for Introduction to Functional Programming (Prentice Hall International Series in Computing Science)

Example text

Consider, for instance, the following definition: three num -t num 3 three x Suppose we submit the above definition to the evaluator, enter a session and type three ( 1 /0) . 6 FUNCTIONS 41 ? three (1/0) 3 What has happened is that the evaluator does not require the value of the argument to three in order to determine the result , so it does not attempt to evaluate it. l and the function is non-strict. For a number of reasons, a non-strict semantics is preferable to a strict one. First, it makes reasoning about equality easier.

We suppose: (+) : : num --+ num --+ num 1st : : (a, (3 ) --+ a As a necessary first step, we must take account of the fact that the two occurrences of the polymorphic function 1st need not receive the same in­ stantiations for the type variables a and (3 . After all , the expression: 1st ( 1 , True) + 1st ( 1 , 42) is well-typed, even though the first occurrence of 1st has type (num, bool) --+ num, and the second has type ( num, num) --+ num. To deal with this point, we rewrite the definition of I in the form: Ixy = Istl X + Ist 2 y and assume two different instantiations: Istl .

1 Numb ers The data type num consists of whole numbers ( or integers) and fractional numbers ( also calle d floating-point numbers). A whole number is a number whose fractional part is zero. 0 Although there are infinitely many numbers, computers have finite ca­ pacities and can only store a limited range. Even within a finite range there are infinitely many fractional numbers, so not all numbers can be stored ex­ actly. It is wise to be aware that a limitation exists, especially since it can cause what appears to be a mathematically correct program to fail or return unexpected results.

Download PDF sample

Introduction to Functional Programming (Prentice Hall International Series in Computing Science) by Richard Bird


by Jeff
4.2

Rated 4.88 of 5 – based on 11 votes