Intro; Table of Contents; About the Author; About the Technical Reviewer; Acknowledgments; Introduction; Part I: First Steps; Chapter 1: Going Functional; Why Haskell?; Why Pure Functional Programming?; Why Strong Static Typing?; The Haskell Ecosystem; The History of Haskell; Your Working Environment; Installing on Windows or Mac OS X; Installing on Linux; Installing on Linux from Source; First Steps with GHCi; The Time Machine Store; Summary; Chapter 2: Declaring the Data Model; Characters, Numbers, and Lists; Characters; Numbers; Strings; Lists; Creating a New Project
Text of Note
Creating a Project with CabalCreating a Project with Stack; Understanding Modules; Cabal and Stack; Defining Simple Functions; Creating a Simple Function; Specifying the Function's Type; Developing a Robust Example; Returning More Than One Value; Working with Data Types; Pattern Matching; Simple Patterns; Lists and Tuples; Guards; View Patterns; Records; Creation and Use; The Default Values Idiom; Summary; Chapter 3: Increasing Code Reuse; Parametric Polymorphism; Functions As Parameters; Higher-Order Functions; Anonymous Functions; Partial Application of a Function; More on Modules
Text of Note
Different Sorts of StateState and Lenses; Reader, Writer, and RWS; Mutable References with ST; Summary; Chapter 7: More Monads: Now for Recommendations; Returning More Than One Value; The List Monad; A New View Over Monads; Failures and Alternatives; Association Rules Learning; Flattening Values into Transactions; The Apriori Algorithm; Search Problems; Paths in a Graph; The Logic Monad; Monads and Lists Redux; Combining Values Under a Monad; Monad Comprehensions; Combining Monads; Monad Transformers; Monad Classes; Summary; Chapter 8: Working in Several Cores
Text of Note
Module ImportsSmart Constructors and Views; Diving into Lists; Folds; Lists and Predicates; Lists Containing Tuples; List Comprehensions; Haskell Origami; Summary; Chapter 4: Using Containers and Type Classes; Using Packages; Managing Dependencies; Building Packages; Building Packages with Cabal; Building Packages with Stack; Obtaining Help; Containers: Maps, Sets, Trees, Graphs; Maps; Sets; Trees; Graphs; Ad Hoc Polymorphism: Type Classes; Declaring Classes and Instances; Built-in Type Classes; Binary Trees for the Minimum Price; Step 1: Simple Binary Trees; Step 2: Polymorphic Binary Trees
Text of Note
Step 3: Binary Trees with Monoidal CacheContainer-Related Type Classes; Functors; Foldables; Summary; Chapter 5: Laziness and Infinite Structures; An Infinite Number of Time Machines; Lazy Evaluation Model; Understanding Evaluation in Haskell; Problems with Laziness; Pattern Matching and Laziness; Profiling with GHC; Strictness Annotations; Summary; Part II: Data Mining; Chapter 6: Knowing Your Clients Using Monads; Data Mining; Implementing K-means; Lenses; Discovering Monads; Watching Out for Incomplete Data; Combinators for State; Dissecting the Combinators; do Notation; Monad Laws
0
8
8
8
8
SUMMARY OR ABSTRACT
Text of Note
Get a practical, hands-on introduction to the Haskell language, its libraries and environment, and to the functional programming paradigm that is fast growing in importance in the software industry. This book contains excellent coverage of the Haskell ecosystem and supporting tools, include Cabal and Stack for managing projects, HUnit and QuickCheck for software testing, the Spock framework for developing web applications, Persistent and Esqueleto for database access, and parallel and distributed programming libraries. You'll see how functional programming is gathering momentum, allowing you to express yourself in a more concise way, reducing boilerplate, and increasing the safety of your code. Haskell is an elegant and noise-free pure functional language with a long history, having a huge number of library contributors and an active community. This makes Haskell the best tool for both learning and applying functional programming, and Practical Haskell takes advantage of this to show off the language and what it can do. What You Will Learn Get started programming with Haskell Examine the different parts of the language Gain an overview of the most important libraries and tools in the Haskell ecosystem Apply functional patterns in real-world scenarios Understand monads and monad transformers Proficiently use laziness and resource management Who This Book Is For Experienced programmers who may be new to the Haskell programming language. However, some prior exposure to Haskell is recommended.