By Marco Block, Adrian Neumann

Das Buch bietet eine kompakte Einführung in die funktionale Programmierung mit Haskell. Die Autoren vermitteln zunächst anhand von Beispielen grundlegende Konzepte, die das Fundament für die funktionale Programmentwicklung bilden. Anschließend werden fortgeschrittene Aspekte behandelt und zahlreiche neue Anwendungen und Themengebiete vorgestellt. Mit Übungsaufgaben zu jedem Kapitel und Lösungen am Ende des Buchs kann der Stoff auch im Selbststudium erarbeitet werden. Die Webseite zum Buch enthält Beispiele und weitere Materialien.

Show description

Read Online or Download Haskell-Intensivkurs: Ein kompakter Einstieg in die funktionale Programmierung PDF

Best compilers books

Joel on Software: And on Diverse and Occasionally Related Matters That Will Prove of Interest to Software Developers, Designers, and Managers, and to Those Who, Whether by Good Fortune or Ill Luck, Work with Them in Some Capacity

Joel Spolsky started his mythical net log, www. joelonsoftware. com, in March 2000, on the way to supply insights for bettering the realm of programming. Spolsky established those observations on years of non-public adventure. the outcome only a handful of years later? Spolsky's technical wisdom, caustic wit, and awesome writing talents have earned him prestige as a programming guru!

From Linear Operators to Computational Biology Essays in Memory of Jacob T. Schwartz

Foreword. - advent. - Nature as Quantum laptop. - Jack Schwartz Meets Karl Marx. - SETL and the Evolution of Programming. - choice approach for straightforward Sublanguages of Set conception XVII: generally happening Decidable Extensions of Multi-level Syllogistic. - Jack Schwartz and Robotics: The Roaring Eighties.

Principles of Compilers: A New Approach to Compilers Including the Algebraic Method

"Principles of Compilers: a brand new method of Compilers together with the Algebraic process" introduces the tips of the compilation from the common intelligence of humans via evaluating similarities and alterations among the compilations of common languages and programming languages. The notation is created to checklist the resource language, objective languages, and compiler language, vividly illustrating the multilevel strategy of the compilation within the technique.

Formal Techniques for Safety-Critical Systems: Third International Workshop, FTSCS 2014, Luxembourg, November 6-7, 2014. Revised Selected Papers

This ebook constitutes the refereed complaints of the 3rd overseas Workshop on Formal ideas for Safety-Critical structures, FTSCS 2014, held in Luxembourg, in November 2014. The 14 revised complete papers awarded including invited talks have been rigorously reviewed and chosen from forty submissions.

Extra resources for Haskell-Intensivkurs: Ein kompakter Einstieg in die funktionale Programmierung

Example text

Mit dem Algorithmus von Eratosthenes lassen sich Primzahlen kleiner oder gleich einer vorgegebenen Obergrenze erzeugen. Für unser folgendes Beispiel sollen alle Primzahlen bis 40 erzeugt werden. Dazu notieren wir uns zunächst alle Elemente von 2 bis 40 in einer Liste. Die 2 als erstes Element der Liste stellt eine Primzahl dar (s. Abb. 2). Die grauen Zahlen sind noch Primzahlkandidaten. Wir können die 2 als Primzahl markieren und streichen alle Vielfachen von 2 aus der restlichen Liste. Abb. 2 Die oberste Abbildung zeigt die Startliste, bei der die 2 als kleinste Primzahl definiert ist.

Da der (:)-Operator eine Liste in zwei Teile zerlegt, lässt sich auch die restliche Liste ohne das erste Element als Funktion angeben: rest :: [a] -> [a] rest (_:xs ) = xs Das Pattern (_:xs) bedeutet: Ignoriere den Kopf der Liste und nenne den Rest xs. Der Datentyp des Rückgabewerts xs ist demzufolge nicht a, sondern eine Liste vom Typ a. 1 Listen 53 Hugs > rest " hallo " " allo " Hugs > rest [] Program error : pattern match failure: rest [] Für den Rest einer leeren Liste gibt es kein Pattern, daher liefert Hugs einen Fehler.

3 Kaskadenförmige Rekursion Es gelten die gleichen Bedingungen wie bei der linearen Rekursion, mit folgender Ausnahme: Sollten mehrere Funktionsaufrufe der Funktion f in einem Zweig vorkommen, sprechen wir von einer kaskadenförmigen oder baumartigen Rekursion. Ein typisches Beispiel für eine kaskadenförmige Rekursion ist die Definition der berühmten Fibonacci-Zahlen: f ib(0) = 0 f ib(1) = 1 f ib(n) = f ib(n − 1) + f ib(n − 2) , für n > 1 In Abb. 1 wird die Abarbeitung durch ein Beispiel deutlich.

Download PDF sample

Haskell-Intensivkurs: Ein kompakter Einstieg in die by Marco Block, Adrian Neumann
Rated 4.15 of 5 – based on 5 votes