Free

# Happy Learn Haskell Tutorial Volume I

By GetContented
Free
Book Description

Welcome to a great book to learn some Haskell, one of the best programming languages ever.

This tutorial uses a gradual method. It'seasier to learn and understand.

Using quirky cartoons and practical programs we'll journey together, making programming fun and keeping itinteresting!

We'd love you to support our work by buying a copy, but it's totally free even if you don't. Tell everyone you know!

Read online.

Table of Contents
• How to learn Haskell enjoyably
• Fascination
• Wish to Create
• Too Many Details?
• The Journey Begins
• And Now You...
• No Magic, But Why Pain?
• Precise Language
• Taking Care
• Two Phases of Learning
• Stages Build Skill
• Simple, but Fun Examples
• Progressive Learning
• Natural Assmiliation
• Motivation is King
• Your First Step
• Values
• Types
• Definitions
• Functions
• Our First Program
• A Definition
• A Term, or Variable Name
• A Function Name
• A String Value
• An Expression
• Homework
• Types as Jigsaw Pieces
• A String Value
• Puzzles
• Definitions again
• Type Annotations
• Types for Functions
• IO Actions as Puzzles
• Putting values together like puzzle pieces
• The whole program
• Another way to look at it
• What is a Function?
• Arguments?
• Nonsense Programs?
• The shape of main
• The two simple programs
• Pulling the definitions apart more
• Are signatures mandatory?
• Signatures as documentation
• Homework
• The Main Road
• How a Haskell Program is Made
• Purity
• Everything in Haskell is pure
• An Analogy
• Haskell is Awesome
• Function Magic
• A Story of Magic Coins
• After the Story
• Functions that Return Functions
• Homework
• Sockets & Plugs
• Reusability
• Functions are Values
• Plugging Values into Functions
• Defining Functions
• Operator Sections
• What is commutivity?
• Homework
• Output Other Things
• Integer or Int?
• Type Variables
• Type Variables can be named anything
• Typeclasses
• The Show Typeclass
• Parentheses and Precedence
• The print Function
• Homework
• Make Decisions
• if...then...else expressions
• Nesting if Expressions
• Case Expressions
• Guard Patterns
• Argument Pattern Matching
• Conclusions
• Homework
• Shop For Food with List
• The Smallest List
• The (:) Operator
• List Syntax
• The List Type
• Lists of Other Types
• Lists with More Items
• Polymorphic Values and Types
• The (:) Operator Again, Binding & Associativity
• The Shopping List
• Counting The Items
• Adding a Message with (++)
• Pattern-Matching with the (:) Value Constructor
• Totality and More on Pattern-Matching with (:)
• Prefix Operator Pattern-Matching
• A Tiny Bit of Recursion
• The Final Shopping List Program
• Homework
• A Dream Within a Dream
• Predicates, String, Char
• The Ord typeclass
• Transforming Titles
• Building Up a Function to Rename the Movie List
• Homework
• More Shopping
• Tuples
• Type Aliases (or Type Synonyms)
• The Final Program
• More Recursion Explained
• Folding
• Using foldr
• Built in Recursive Functions
• Homework
• How To Write Programs
• At The Zoo
• Sum Types
• Pattern Matching with Sum Types
• More Recursion
• What is Currying?
• The Finished Program
• Homework
• Cats and Houses
• Another Sum Type
• Product Types and Algebraic Data Types
• Pattern-Matching Product Types
• Function Composition
• Importing a Module
• Maybe An Answer
• A Little Finding & Sorting
• More About Maybe
• The Final Program
• Homework
• Basic Output
• Setup Your Environment
• putStrLn, print and String
• Ways To Solve Problems
• Guided Exercise 1: Display Hello
• Guided Exercise 2: Display the Sum of Two Numbers
• Guided Exercise 2: Display the Product of Two Numbers
• Reader Exercise 1
• Reader Exercise 2
• Reader Exercise 3
• Reader Exercise 4
• Reader Exercise 5
• Reader Exercise 6
• Fridge, The Game
• Do Blocks with IO
• Do Block Nesting
• Whole-Program Recursion
• Homework
• The People Book
• Models of Data
• More on Data Types
• Making Our Types Show
• Building Our First Value
• Records
• Finding a Person from the List
• Filtering out People in a List
• A Note About List Efficiency
• Higher Order Functions: filter
• Some Eta Reduction
• Using filter
• Higher Order Functions: map
• Higher Order Functions: sortBy
• Removing Parentheses With The (\$) Function
• Using minimumBy
• Homework
• Times-Table Train of Terror
• Tuples or Pairs
• Ranges and the zip function
• Determining the Level Number
• The game loop
• Homework
• Skwak the Squirrel
• More on the (\$) Function
• Mid-Lesson Homework
• Continuing On
• Basic Input
• Guided Program 1
• Guided Program 2
• Guided Program 3
• A Little More About IO
• Your Turn
• Reader Exercise 1
• Reader Exercise 2
• Reader Exercise 3
• Reader Exercise 4
• Reader Exercise 5
• Getting Set Up
• Mac Set Up
• Manual Set Up
• Questions & Community
• Frequently Asked Questions
• Volume 2 and Language Features
• Many Thanks
You May Also Like
Also Available On
Categories
Curated Lists
• #### Free Machine Learning Books

11 Books

Pattern Recognition and Machine Learning (Information Science and Statistics)
by Christopher M. Bishop
Data mining
by I. H. Witten
The Elements of Statistical Learning: Data Mining, Inference, and Prediction
by Various
See more...
• #### Free Chemistry Textbooks

8 Books

CK-12 Chemistry
by Various
Chemistry Grade 10 [CAPS]
by Free High School Science Texts Project
General Chemistry II
by John Hutchinson
See more...
• #### Free Mathematics Textbooks

21 Books

Microsoft Word - How to Use Advanced Algebra II.doc
by Jonathan Emmons
Advanced Algebra II: Activities and Homework
by Kenny Felder
de2de
by
See more...
• #### Free Children Books

38 Books

The Sun Who Lost His Way
by
Tania is a Detective
by Kanika G
Firenze_s-Light
by
See more...
• #### Free Java Books

10 Books

Java 3D Programming
by Daniel Selman
The Java EE 6 Tutorial
by Oracle Corporation
JavaKid811
by
See more...
• #### Sts Peter And Paul Preparatory School eBook List

8 Books

Jamaica Primary Social Studies 2nd Edition Student's Book 4
by Eulie Mantock, Trineta Fendall, Clare Eastland
Reggae Readers Student's Book 1
by Louis Fidge
Reggae Readers Student's Book 2
by Louis Fidge
See more...