
Haskell Cookbook
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Person
Yogesh Sajanikar has received his bachelor's degree in Mechanical Engineering from Shivaji University, India, along with a gold medal and a master's degree in Production Engineering from the Indian Institute of Technology, Bombay, India. Yogesh has an experience of more than 20 years, and he has extensively worked with Product Lifecycle Management (PLM) and Computer Aided Design (CAD) software development firms, and architected solutions for domains such as Construction and Shipping Domain. Having hooked on to functional programming, he moved into the Finance domain and worked as an enterprise architect; he has also worked with Scala/F# and Haskell. Currently, he is working as a CTO for a startup. He has also started local Haskell meetups and has been an active participant in meetups and functional conferences. Yogesh believes in the open source movement, and believes in giving back to the open source community.
Content
- 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 do it.
- How it works...
- There's more.
- Working with pure functions and user-defined data types
- Getting ready
- How to do it...
- How it works...
- Source formatting
- Working with list functions
- Getting ready
- How to do it...
- How 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 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 do it...
- How it works...
- Map 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...
- 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
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.