Haskell Design Patterns

Take your Haskell and functional programming skills to the next level by exploring new idioms and design patterns
Preview in Mapt

Haskell Design Patterns

Ryan Lemmer

1 customer reviews
Take your Haskell and functional programming skills to the next level by exploring new idioms and design patterns
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $27.99
Save 64%
Print + eBook
$34.99
RRP $34.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$34.99
$29.99 p/m after trial
RRP $27.99
RRP $34.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Haskell Design Patterns Book Cover
Haskell Design Patterns
$ 27.99
$ 10.00
Haskell High Performance Programming Book Cover
Haskell High Performance Programming
$ 39.99
$ 10.00
Buy 2 for $20.00
Save $47.98
Add to Cart

Book Details

ISBN 139781783988723
Paperback166 pages

Book Description

Design patterns and idioms can widen our perspective by showing us where to look, what to look at, and ultimately how to see what we are looking at. At their best, patterns are a shorthand method of communicating better ways to code (writing less, more maintainable, and more efficient code).

This book starts with Haskell 98 and through the lens of patterns and idioms investigates the key advances and programming styles that together make "modern Haskell". Your journey begins with the three pillars of Haskell. Then you'll experience the problem with Lazy I/O, together with a solution. You'll also trace the hierarchy formed by Functor, Applicative, Arrow, and Monad. Next you'll explore how Fold and Map are generalized by Foldable and Traversable, which in turn is unified in a broader context by functional Lenses. You'll delve more deeply into the Type system, which will prepare you for an overview of Generic programming. In conclusion you go to the edge of Haskell by investigating the Kind system and how this relates to Dependently-typed programming.

Table of Contents

Chapter 1: Functional Patterns – the Building Blocks
Higher-order functions
Currying functions
Recursion
Types, pattern matching and polymorphism
Lazy evaluation
Monads
Summary
Chapter 2: Patterns for I/O
I/O as a first class citizen
Imperative I/O
Lazy I/O
Iteratee I/O
Comparing the three styles of I/O
Summary
Chapter 3: Patterns of Composition
Functor
Applicative functor
Monad
Arrows
Summary
Chapter 4: Patterns of Folding and Traversing
Folding over lists
Mapping over lists
Modernizing Haskell 98
Lenses
Summary
Chapter 5: Patterns of Type Abstraction
Abstracting function types: RankNTypes
Abstracting datatypes
Abstracting type-classes
Summary
Chapter 6: Patterns of Generic Programming
Patterns of generic programming
The sum of products style
Origami programming
Scrap your boilerplate
Summary
Chapter 7: Patterns of Kind Abstraction
Higher-order kinds
Higher-kinded polymorphism
Associated type synonyms
Type (synonym) families
Kind polymorphism
Type promotion
Type-level programming
Dependently-typed programming
Summary
Epilogue

What You Will Learn

  • Understand the relationship between the “Gang of Four” OOP Design Patterns and Haskell
  • Try out three ways of Streaming I/O: imperative, Lazy, and Iteratee based
  • Explore the pervasive pattern of Composition: from function composition through to high-level composition with Lenses
  • Synthesize Functor, Applicative, Arrow and Monad in a single conceptual framework
  • Follow the grand arc of Fold and Map on lists all the way to their culmination in Lenses and Generic Programming
  • Get a taste of Type-level programming in Haskell and how this relates to dependently-typed programming
  • Retrace the evolution, one key language extension at a time, of the Haskell Type and Kind systems
  • Place the elements of modern Haskell in a historical framework

Authors

Table of Contents

Chapter 1: Functional Patterns – the Building Blocks
Higher-order functions
Currying functions
Recursion
Types, pattern matching and polymorphism
Lazy evaluation
Monads
Summary
Chapter 2: Patterns for I/O
I/O as a first class citizen
Imperative I/O
Lazy I/O
Iteratee I/O
Comparing the three styles of I/O
Summary
Chapter 3: Patterns of Composition
Functor
Applicative functor
Monad
Arrows
Summary
Chapter 4: Patterns of Folding and Traversing
Folding over lists
Mapping over lists
Modernizing Haskell 98
Lenses
Summary
Chapter 5: Patterns of Type Abstraction
Abstracting function types: RankNTypes
Abstracting datatypes
Abstracting type-classes
Summary
Chapter 6: Patterns of Generic Programming
Patterns of generic programming
The sum of products style
Origami programming
Scrap your boilerplate
Summary
Chapter 7: Patterns of Kind Abstraction
Higher-order kinds
Higher-kinded polymorphism
Associated type synonyms
Type (synonym) families
Kind polymorphism
Type promotion
Type-level programming
Dependently-typed programming
Summary
Epilogue

Book Details

ISBN 139781783988723
Paperback166 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Haskell High Performance Programming Book Cover
Haskell High Performance Programming
$ 39.99
$ 10.00
Haskell Cookbook Book Cover
Haskell Cookbook
$ 39.99
$ 10.00
Learning Haskell Data Analysis Book Cover
Learning Haskell Data Analysis
$ 27.99
$ 10.00
Haskell Financial Data Modeling and Predictive Analytics Book Cover
Haskell Financial Data Modeling and Predictive Analytics
$ 23.99
$ 10.00
Learning Concurrent Programming in Scala Book Cover
Learning Concurrent Programming in Scala
$ 26.99
$ 10.00
Rust Essentials Book Cover
Rust Essentials
$ 23.99
$ 10.00