Build powerful software solutions and develop proficiency in Haskell, from understanding the foundational principles through to mastering advanced functional programming concepts
Key FeaturesLearn from an expert lecturer and researcher who knows all the ins and outs of HaskellDevelop a clear understanding of Haskell, from the basics through to advanced conceptsGet to grips with all the key functional programming techniquesPurchase of the print or Kindle book includes a free PDF eBookBook DescriptionWith software systems reaching new levels of complexity and programmers aiming for the highest productivity levels, software developers and language designers are turning toward functional programming because of its powerful and mature abstraction mechanisms. This book will help you tap into this approach with Haskell, the programming language that has been leading the way in pure functional programming for over three decades.
The book begins by helping you get to grips with basic functions and algebraic datatypes, and gradually adds abstraction mechanisms and other powerful language features. Next, you’ll explore recursion, formulate higher-order functions as reusable templates, and get the job done with laziness. As you advance, you’ll learn how Haskell reconciliates its purity with the practical need for side effects and comes out stronger with a rich hierarchy of abstractions, such as functors, applicative functors, and monads. Finally, you’ll understand how all these elements are combined in the design and implementation of custom domain-specific languages for tackling practical problems such as parsing, as well as the revolutionary functional technique of property-based testing.
By the end of this book, you’ll have mastered the key concepts of functional programming and be able to develop idiomatic Haskell solutions.
What you will learnWrite pure functions in all their forms – that is basic, recursive, and higher-order functionsModel your data using algebraic datatypesMaster Haskell’s powerful type-class mechanism for ad hoc overloadingFind out how Haskell’s laziness gets the job doneReconcile Haskell’s functional purity with side effectsFamiliarize yourself with the functor, applicative functor, monad hierarchyDiscover how to solve problems with domain-specific languagesFind more bugs with Haskell’s property-based testing approachWho this book is forIf you are a programmer looking to gain knowledge of Haskell who’s never been properly introduced to functional programming, this book is for you. Basic experience with programming in a non-functional language is a prerequisite. This book also serves as an excellent guide for programmers with limited exposure to Haskell who want to deepen their understanding and foray further into the language.
Table of ContentsFunctionsAlgebraic Datatypes and Pattern MatchingRecursionHigher-Order FunctionsFirst-Class FunctionsType ClassesLazy EvaluationInput/OutputMonoids and FoldablesFunctor, Applicative Functor, and TraversableMonadsMonad TransformersDomain-Specific LanguagesParser CombinatorsLensesProperty-b
My conclusion: if you have some experience with mainstream programming languages, and are curious about the most famous programming language when it comes to strongly typed, type-driven, purely functional programming, then you can't go wrong with this excellent introductory book about Haskell.
This book is not only an excellent introduction to type-driven, idiomatic functional programming using Haskell, but it's also a masterclass in pedagogy. Not only each chapter is crystal clear, building on the preceding chapters at a reasonable pace, but also enough care is taken by the author to direct your focus and attention to what actually matters and potential pitfalls. And I say this as someone who's not an Haskell expert, someone who still remembers what it feels like to understand "strange sounding" concepts and techniques (you can read my blog entry titled "One year with “Haskell Programming from First Principles”" to see what I mean).
The only book that comes close to this one in terms of clarity and pedagogy is Programming in Haskell.
We're lucky that Tom Schrijvers found enough time to write such an excellent book. And I believe some of us can pay forward the debt by creating high quality documentation and training materials for other parts of Haskell, as well as software that is easy to maintain and build on top of.