oder
Loggen Sie sich ein, um 1-Click® einzuschalten.
oder
Mit kostenloser Probeteilnahme bei Amazon Prime. Melden Sie sich während des Bestellvorgangs an.
Jetzt eintauschen
und EUR 11,62 Gutschein erhalten
Eintausch
Alle Angebote
Möchten Sie verkaufen? Hier verkaufen
Der Artikel ist in folgender Variante leider nicht verfügbar
Keine Abbildung vorhanden für
Farbe:
Keine Abbildung vorhanden

 
Den Verlag informieren!
Ich möchte dieses Buch auf dem Kindle lesen.

Sie haben keinen Kindle? Hier kaufen oder eine gratis Kindle Lese-App herunterladen.

Introduction Functional Programming (Prentice Hall Series in Computer Science) [Englisch] [Taschenbuch]

Richard Bird , Thomas E. Scruggs , Margo A. Mastropieri
5.0 von 5 Sternen  Alle Rezensionen anzeigen (2 Kundenrezensionen)
Preis: EUR 62,50 kostenlose Lieferung. Siehe Details.
  Alle Preisangaben inkl. MwSt.
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Nur noch 4 auf Lager (mehr ist unterwegs).
Verkauf und Versand durch Amazon. Geschenkverpackung verfügbar.
Lieferung bis Freitag, 22. August: Wählen Sie an der Kasse Morning-Express. Siehe Details.

Kurzbeschreibung

21. April 1998 Prentice Hall Series in Computer Science
After the success of the first edition of Introduction to Functional Programming, the authors have thoroughly updated and revised this bestselling title. This book is unusual amongst books on functional programming in that it is primarily directed towards the concepts of functional programming, rather than their realization in a specific programming language. The book clearly expounds the construction of functional programs as a process of mathematical calculation, but the mathematics is restricted to that relevant to the actual construction of programs.

Hinweise und Aktionen

  • Studienbücher: Ob neu oder gebraucht, alle wichtigen Bücher für Ihr Studium finden Sie im großen Studium Special. Natürlich portofrei.


Wird oft zusammen gekauft

Introduction Functional Programming (Prentice Hall Series in Computer Science) + Pearls of Functional Algorithm Design
Preis für beide: EUR 102,45

Die ausgewählten Artikel zusammen kaufen
  • Pearls of Functional Algorithm Design EUR 39,95


Produktinformation

  • Taschenbuch: 448 Seiten
  • Verlag: Prentice Hall; Auflage: Revised. (21. April 1998)
  • Sprache: Englisch
  • ISBN-10: 0134843460
  • ISBN-13: 978-0134843469
  • Größe und/oder Gewicht: 23,6 x 17,6 x 2,2 cm
  • Durchschnittliche Kundenbewertung: 5.0 von 5 Sternen  Alle Rezensionen anzeigen (2 Kundenrezensionen)
  • Amazon Bestseller-Rang: Nr. 144.074 in Fremdsprachige Bücher (Siehe Top 100 in Fremdsprachige Bücher)
  • Komplettes Inhaltsverzeichnis ansehen

Mehr über die Autoren

Entdecken Sie Bücher, lesen Sie über Autoren und mehr

Produktbeschreibungen

Synopsis

After the success of the first edition of Introduction to Functional Programming, the authors have thoroughly updated and revised this bestselling title. This book is unusual amongst books on functional programming in that it is primarily directed towards the concepts of functional programming, rather than their realization in a specific programming language. The book clearly expounds the construction of functional programs as a process of mathematical calculation, but the mathematics is restricted to that relevant to the actual construction of programs.

Buchrückseite

After the success of the first edition, Introduction to Functional Programming using Haskell has been thoroughly updated and revised to provide a complete grounding in the principles and techniques of programming with functions. The second edition uses the popular language Haskell to express functional programs. There are new chapters on program optimisation, abstract datatypes in a functional setting, and programming in a monadic style. There are complete new case studies, and many new exercises. As in the first edition, there is an emphasis on the fundamental techniques for reasoning about functional programs, and for deriving them systematically from their specifications. The book is self-contained, assuming no prior knowledge of programming and is suitable as an introductory undergraduate text for first- or second-year students.


Welche anderen Artikel kaufen Kunden, nachdem sie diesen Artikel angesehen haben?


In diesem Buch (Mehr dazu)
Ausgewählte Seiten ansehen
Buchdeckel | Copyright | Inhaltsverzeichnis | Auszug | Stichwortverzeichnis | Rückseite
Hier reinlesen und suchen:

Eine digitale Version dieses Buchs im Kindle-Shop verkaufen

Wenn Sie ein Verleger oder Autor sind und die digitalen Rechte an einem Buch haben, können Sie die digitale Version des Buchs in unserem Kindle-Shop verkaufen. Weitere Informationen

Kundenrezensionen

4 Sterne
0
3 Sterne
0
2 Sterne
0
1 Sterne
0
5.0 von 5 Sternen
5.0 von 5 Sternen
Die hilfreichsten Kundenrezensionen
3 von 3 Kunden fanden die folgende Rezension hilfreich
5.0 von 5 Sternen Introduction to programming 31. März 2010
Format:Taschenbuch|Verifizierter Kauf
In recent years functional programming has made it from the nooks of academia into mainstream computing. Well, not quite. The lingo has arrived, and modern scripting languages such as Groovy, Ruby or Python make heavy use of functional constructs. But truly functional languages are as yet at the outskirts of pragmatic or industrial programming. But they are there: Scala is talked of in the Java world, and F# may soon be making more acolytes in the .Net world (and both these languages owe a lot to Haskell).

The present book is a well written introduction to functional programming using Haskell. It is aimed at undergraduate students taking university courses in computer science. Thus the book pursues a twofold purpose: It both introduces Haskell as a language and it demonstrates essential programming constructs such as lists and trees and algorithms operating on such structures. Examples tend to be formal, and applications of Haskell to real-world programming challenges are not even mentioned. The very strong side of the book is its measured and precise explanation of the fundamental programming constructs of Haskell (chiefly the rather difficult notion of a monad which is the Haskell way of introducing interaction in a functional setting). Its lack of examples from real-world applications makes the style and content of the book at times rather sterile. It is a useful companion to a lecture on programming (and as such it is highly recommended), but for somebody with a good background in computer science and experience with real-life IT the book may seem off the practical mark at times. For those much better literature is available by now, see for instance Real World Haskell.
Lesen Sie weiter... ›
War diese Rezension für Sie hilfreich?
6 von 10 Kunden fanden die folgende Rezension hilfreich
5.0 von 5 Sternen Endlich etwas anderes 28. März 2006
Von Pavol
Format:Taschenbuch
Funktionales Programmieren scheint momentan der letzte Schrei zu sein. Auch wenn ich skeptisch war, habe ich mich fuer dieses Buch entschieden - ist nicht zu lang und sieht recht interessant aus. Mein erster Versuch scheiterte nach 250 Seiten, wo ich keine Ahnung mehr hatte, wovon die Rede ist. Also der zweite Versuch - diesmal bin ich bis zu "Monads" gekommen - was angeblich das schwierigste Thema ist. Ich hoffe im dritten Lauf alles zu verstehen. Nach diesen zwei Versuchen, kann ich jetzt funktionale Programme lesen und verstehen und habe angefangen, beim Programmieren auf "Side-Effects" zu schauen und diese zu meiden.
In Kurzfassung: Ich kann es nur empfehlen, ich bin ein besserer Programmierer geworden.
War diese Rezension für Sie hilfreich?
Die hilfreichsten Kundenrezensionen auf Amazon.com (beta)
Amazon.com: 3.2 von 5 Sternen  4 Rezensionen
25 von 30 Kunden fanden die folgende Rezension hilfreich
4.0 von 5 Sternen Original classic, theoretical 26. November 2004
Von nunb - Veröffentlicht auf Amazon.com
Format:Taschenbuch
Bird and Wadler got me started on functional programming. Before that, I'd only seen discussions of C++/STL functors and functions like for, map etcetera.

B&W was dense, and magic. It reminded me of the first time I read the K&R C book, you're following along fine, and all of a sudden you're off the deep end!

The syntax, sort of ML-like adds to the 'magic' feel of it all. Overall I think it's a good book. But like with K&R, make this your second or third book, to ground you in the fundamentals after you've become somewhat familiar with the syntax and application of a particular fnal language.

That said, it covers a wide breadth of topics, and does justice to them as well. But this opinion comes from a newbie at functional programming, so caveat lector!

For me, it made me realise that there was a whole 'new' way of programming, vastly bigger than the few functions C++ had in its STL, and that C++ syntax mostly got in the way. However, perhaps because of this book, I never quite grokked Haskell/ML syntax either, though LISP I find easy (easier).
14 von 19 Kunden fanden die folgende Rezension hilfreich
3.0 von 5 Sternen Good info, but dense and ignores details 4. November 2012
Von Roger Costello - Veröffentlicht auf Amazon.com
Format:Taschenbuch|Verifizierter Kauf
There is a lot of excellent information in this book.

However, it is very dense and the reader should beware that many of the programs in the book don't work. I surmise that they are more intended to show the algorithm rather than the actual Haskell implementation.

In Haskell it is particularly important to pay attention to the details, which is why I give this book only three stars.

Here is an example of a program in the book that does not work.

On page 82 the author Richard Bird provides this sample implementation of the floor function:

floor x = searchFrom 0
where searchFrom = decrease . upper . lower
lower = until (<=x) decrease
upper = until (>x) increase
decrease n = n - 1
increase n = n + 1

The problem with that implementation is that it does not return an Integer value; rather, it returns a decimal (Double) value. Here's an example:

floor (-3.4) -- returns (-4.0)

That is wrong. The specification for floor says that it "maps a value of type Float to a value of type Integer." Clearly it is not producing an Integer result.

I will now explain how to revise floor so that it returns an Integer value.

The heart of the problem is with the until function.

Here is how Richard Bird implements it:

until :: (a -> Bool) -> (a -> a) -> a -> a
until p f y = if p y then y else until p f (f y)

It takes three arguments, p, f, and y. Look at the signature of that function. The type of the third argument, y, dictates the type of the other arguments and the type of the result--whatever type y is, the other arguments must be the same type and the result must be the same type.

Function until is first invoked by function lower:

lower = until (<=x) decrease 0

Here are the three arguments provided to function until:

(1) p is the partial function (<=x), where x is the input to the floor function. Suppose x is this value: x = (-3.4)

(2) f is the function decrease

(3) y is 0

Now you may argue, "Hey, the third argument, y, is 0 and that's an Integer, so clearly the result of function until will be an Integer." However, that is not correct. The type of 0 is ambiguous, it could be an Integer or it could be a Double. This ambiguity can be seen by checking its type using WinGHCi:

:type 0
0 :: Num a => a

The class Num is high up in Haskell's type hierarchy and it represents any number (Integer, Double, etc.). Thus, we cannot determine the type of function until's result just by examining its third argument. The other arguments will determine whether the 0 is an Integer or a Double. Let's examine the first argument:

p is the partial function (<=x), where x = (-3.4)

p compares "some value" against (-3.4). Let's check the type of (-3.4) using WinGHCi:

:type (-3.4)
(-3.4) :: Fractional a => a

The datatype Double falls within the class Fractional. So p compares "some value" against a Double.

Fundamental rule of Haskell: you cannot compare an
Integer against a Double, you can only compare a
Double against a Double.

Recall that p compares "some value" against (-3.4). What is that "some value"? If we examine the body of function until we see that it is the third argument, y, and we know that y = 0. Ah, now we know how Haskell will treat 0: since the 0 is being compared against a Double value Haskell will treat the 0 as a Double. Okay, now that we know the type of y we can plug it into the type signature for function until:

until :: (a -> Bool) -> (a -> a) -> Double -> a

All a's must be of the same type, so the other a's must also be Double:

until :: (Double -> Bool) -> (Double -> Double) -> Double -> Double

Therefore function until will return a Double value. For example:

until (<=x) decrease 0 -- returns (0.0)

The output of function until is assigned to function lower:

lower = until (<=x) decrease

So the result of function lower is a Double value.

The output of lower is then input to upper and the Double datatype propagates through the entire chain of composed functions:

decrease . upper . lower

The result of function floor is therefore a Double value.

Okay, so how do we get floor to return an Integer value? The key is to prevent p in function until from casting the type of y to a Double. Recall function lower:

lower = until (<=x) decrease 0

Notice that p is this partial function:

(<=x)

We must modify p to express, "Hey, compare x against an Integer value that has been cast to a Double value." That is implemented using a Lambda (anonymous) function:

(\a -> (realToFrac a) <= x)

Read that as: For whatever value, a, is provided convert it to a Fractional (Double) value and then compare it to x.

Wow!

So we are telling Haskell that the 0 is not to be treated as a Fractional (Double) value, it is to be treated as a Real (Integer) value.

At last, we can implement function floor and it will return the desired Integer result:

floor x = searchFrom 0
where searchFrom = decrease . upper . lower
lower = until (\a -> (realToFrac a) <= x) decrease
upper = until (\a -> (realToFrac a) > x) increase
decrease n = n - 1
increase n = n + 1

Notice that wherever function until is called (in lower and upper), the first argument, p, is a Lambda (anonymous) function that takes its argument, a, and casts it from a Real (Integer) value to a Fractional (Double) value. Here are a couple examples of using this revised floor function:

floor (-3.4) -- returns (-4)
floor 3.4 -- returns 3

Notice that floor now returns an Integer value, which is what we want.

Here is the signature for floor:

floor :: (Fractional a, Ord a, Real c) => a -> c

Read as: Invoke function floor with a Fractional (Double) value and it will return a Real (Integer) value.

On page 83 Richard Bird shows a second version of function floor that uses a binary search:

floor x = searchFrom (-1, 1)
where searchFrom = fst . middle . cross(lower, upper)
lower = until (<= x) double
upper = until (> x) double
middle = until done improve
done (m, n) = (m + 1 == n)
improve (m, n) = if p <= x then (p, n) else (m, p)
where p = (m + n) div 2

That has multiple problems. First, it is syntactically not a well-formed Haskell program because the div operator (on the last line) must have back ticks ( ` ) surrounding it:

where p = (m + n) `div` 2

Second, the functions lower and upper invoke function until. The first argument to until must be a Lambda function as described above:

lower = until (\m -> (realToFrac m) <= x) double
upper = until (\n -> (realToFrac n) > x) double

Third, the function improve compares p (an Integer) against x (a Double), so p must be cast to a Fractional (Double) value:

improve (m, n) = if (realToFrac p) <= x then (p, n) else (m, p)
where p = (m + n) div 2

With those three changes the function works as desired:

floor x = searchFrom (-1, 1)
where searchFrom = fst . middle . cross(lower, upper)
lower = until (\m -> (realToFrac m) <= x) double
upper = until (\n -> (realToFrac n) > x) double
middle = until done improve
done (m, n) = (m + 1 == n)
improve (m, n) = if (realToFrac p) <= x then (p, n) else (m, p)
where p = (m + n) `div` 2

Here are a couple examples of using the revised floor function:

floor (-3.4) -- returns (-4)
floor 3.4 -- returns 3

Notice that floor now returns an Integer value, which is what we want.

Here is the signature for floor:

floor :: (Fractional a, Ord a, Real c) => a -> c

Read as: Invoke function floor with a Fractional (Double) value and it will return a Real (Integer) value.
1 von 1 Kunden fanden die folgende Rezension hilfreich
3.0 von 5 Sternen Be careful what you wish for... 21. Januar 2014
Von Hector Correa - Veröffentlicht auf Amazon.com
Format:Taschenbuch|Verifizierter Kauf
The bad: Despite the "introduction" level implied in the title, this is a hard book to read. The book is not a "Haskell book" either. The author uses a mathematical notation that easily translates to Haskell but it's not Haskell per se.

The good: Having said that, the author gives a very good explanation of some of the concepts that make functional programming different from other paradigms. Some of the explanations given in the book are by far better (and more in-depth) than what's found on the web. That's one of the reason is at times hard to read. For example, the section on curring is very good and raises points that I have not seen in other books/articles.
10 von 47 Kunden fanden die folgende Rezension hilfreich
3.0 von 5 Sternen Nice book on functional programming 17. November 2002
Von Ein Kunde - Veröffentlicht auf Amazon.com
Format:Taschenbuch
This is a good introduction to functional programming.
It is less language specific than some of the other books.
Waren diese Rezensionen hilfreich?   Wir wollen von Ihnen hören.
Kundenrezensionen suchen
Nur in den Rezensionen zu diesem Produkt suchen

Kunden diskutieren

Das Forum zu diesem Produkt
Diskussion Antworten Jüngster Beitrag
Noch keine Diskussionen

Fragen stellen, Meinungen austauschen, Einblicke gewinnen
Neue Diskussion starten
Thema:
Erster Beitrag:
Eingabe des Log-ins
 

Kundendiskussionen durchsuchen
Alle Amazon-Diskussionen durchsuchen
   


Ähnliche Artikel finden


Ihr Kommentar