Haskell cookbook build functional applications using Monads, Applicatives, and Functors
Save time and build fast, functional, and concurrent application using Haskell About This Book Comprehensive guide for establishing a strong foundation in Haskell and developing pragmatic code Create a full fledged web application using Haskell Work with Lens, Haskell Extensions, and write code for...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham, [England] ; Mumbai, [India] :
Packt
2017.
|
Edición: | 1st edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630510706719 |
Tabla de Contenidos:
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Table of Contents
- Preface
- Chapter 1: Foundations of Haskell
- Introduction
- Getting started with Haskell
- How to do it...
- How it works…
- Dissecting Hello World
- There's more…
- Working with data types
- How to&
- #160
- do it…
- How&
- #160
- it works...
- There's more…
- Working with pure functions and user-defined data types
- Getting ready
- How&
- #160
- to do it...
- How it works...
- Source formatting
- Working with list functions
- Getting ready
- How to do it...
- How&
- #160
- it works...
- List creation
- Enumerated list
- Head and tail of a list
- Operations on a list
- Indexed access
- Checking whether an element is present
- Pattern matching on list
- List concatenation
- Strings are lists
- There's more…
- Chapter 2: Getting Functional
- Introduction
- Working with recursive functions
- Getting ready
- How to&
- #160
- do it...
- How it works...
- There's more...
- Reversing a list - Recursive worker function pattern
- Getting ready
- How to do it...
- How it works...
- There's more...
- Creating maps and filters
- Getting ready
- How to&
- #160
- do it...
- How it works...
- Map&
- #160
- function
- Filter function
- There's more...
- Working with laziness and recursion
- Getting ready
- How to do it...
- How it works...
- Working with folds
- Getting ready
- How to do it...
- How it works...
- There's more...
- Sorting a list
- Getting ready
- How to do it...
- How it works...
- There's more...
- Implementing merge sort
- Getting ready
- How to do it...
- How it works...
- Implementing Eratosthenes Sieve
- Getting ready
- How to do it...
- How it works...
- There's more...
- Chapter 3: Defining Data.
- Introduction
- Defining a product type
- Getting ready
- How to do it...
- How it works...
- Defining a sum type
- Getting ready
- How to do it...
- How it works...
- Defining a binary tree and traversing it
- Getting ready
- How to do it...
- How it works...
- Defining data with functions
- Getting ready
- How to do it...
- How it works...
- Using Maybe
- Getting ready
- How to do it...
- How it works...
- Using Either
- Getting ready
- How to do it...
- How it works...
- Working with type classes
- Getting ready
- How to do it...
- How it works...
- Working with Monoid
- Getting ready
- How to do it...
- How it works...
- Chapter 4: Working with Functors, Applicatives, and Monads
- Introduction
- Working with Functors
- How to do it...
- How it works...
- Binary tree as Functor
- How to do it...
- How it works...
- Working with Applicatives
- How to do it...
- How it works...
- Binary tree as Applicative
- How to do it...
- How it works...
- Working with monad
- How to do it...
- How it works...
- There's more...
- List as monad
- How to do it...
- How it works...
- Working with IO monad
- How to do it...
- How it works...
- Writing INI parser
- How to do it...
- How it works...
- Errors and exception handling
- How to do it...
- How it works...
- Chapter 5: More about Monads
- Introduction
- Writing a State Monad
- How to do it...
- How it works...
- Computing a fibonacci number with State Monad
- How to do it...
- How it works...
- Writing a State Monad transformer
- How to do it...
- How it works...
- Working with the Reader monad transformer
- How to do it...
- How it works...
- Working with the Writer monad transformer
- Getting ready
- How to do it...
- How it works...
- Combining monad transformers
- How to do it...
- How it works.
- Chapter 6: Working with Common Containers and Strings
- Introduction
- Working with sets
- How to do it...
- How it works...
- Shopping cart as a set
- How to do it...
- How it works...
- Working with maps
- How to do it...
- How it works...
- Log analysis with map
- How to do it...
- How it works...
- Working with vector
- How to do it...
- How it works...
- Working with text and bytestring
- How to do it...
- How it works...
- Creating and testing a priority queue
- Getting ready
- How to do it...
- How it works...
- Working with Foldable and Traversable
- How to do it...
- How it works...
- Chapter 7: Working with Relational and NoSQL Databases
- Introduction
- Working with Persistent
- How to do it...
- How it works...
- Managing migrations
- How to do it...
- How it works...
- Creating custom data types
- How to do it...
- How it works...
- Using Esqueleto to do advanced SQL queries
- How to do it...
- How it works...
- Using hedis to work with redis (key-value, list and hash)
- Getting ready...
- How to do it...
- How it works...
- Using hashsets and sorted sets in redis to create a Trie
- Getting ready
- How to do it...
- How it works...
- Chapter 8: Working with HTML and Templates
- Introduction
- Using blaze to create an HTML template
- How to do it...
- How it works...
- Using blaze to reverse engineer an HTML page
- How to do it...
- How it works...
- Use blaze-html with Bootstrap to create HTML template
- How to do it...&
- #160
- How it works...
- Using heist as a template engine
- How to do it...
- How it works...
- Working with splice in Heist
- How to do it...
- How it works...
- Chapter 9: Working with Snap Framework
- Introduction
- Getting started with Snap
- How to do it...
- How it works...
- Routing in Snap
- How to do it...
- How it works.
- Serving static contents in Snap
- How to do it...
- How it works...
- Form handling in Snap
- How to do it...
- How it works...
- Creating and composing snaplets
- How to do it...
- How it works...
- Session handling in Snap
- How to do it...
- How it works...
- Authentication in Snap
- How to do it...
- How it works...
- File upload with Snap
- How to do it...
- How it works...
- Chapter 10: Working with Advanced Haskell
- Introduction
- Working with existentially quantified type
- How to do it...
- How it works...
- Working with Rank-N type
- How to do it...
- How it works...
- Working with type family
- How to do it...
- How it works...
- Working with GADTs
- How to do it...
- How it works...
- Chapter 11: Working with Lens and Prism
- Introduction
- Creating lenses
- How to do it...
- How it works...
- Working with lenses
- How to do it...
- How it works...
- Working with Traversal
- How to do it...
- How it works...
- Working with Iso
- How to do it...
- How it works...
- Working with Prism
- How to do it...
- How it works...
- Working with predefined lenses
- Getting ready
- How to do it...
- How it works...
- Chapter 12: Concurrent and Distributed Programming in Haskell
- Introduction
- Working with IORef
- How to do it...
- How it works...
- Working with MVar
- How to do it...
- How it works...
- Working with STM
- How it works...
- How it works...
- Working with strategies
- How to do it...
- How it works...
- Working with monad-par
- How to do it...
- How it works...
- Working with Cloud Haskell
- Getting ready
- How to do it...
- How it works...
- Using Cloud Haskell to start master and slave nodes
- How to do it...
- How it works...
- Using closure to communicate between nodes
- How to do it...
- How it works...
- Index.