2. Starting Out
Learn how to make lists and tuples. We also learn the basic list manipulation commands.
- Create a list:
[5..13]
or[5,10..100]
or[ n^2 | n<-[1..100], even n]
- Create a tuple:
(5,12)
- Key to remember: head, tail, init, last,
:
,++
See the summary for more details about the contents of the chapter.
Resources
- Reading guide
- Problem Set hw:a2 for chapter 2. (Also PDF.)
- Summary of Chapter 2
Haskell CW II.2
Project Euler problems.
Haskell CW II.3a
Tiny pieces to help you get better at programming in Haskell.
Haskell CW II.3b
Learning questions to help with II.3.
Haskell CW II.4
Intro to functions and signatures.
Haskell CW II.6
Introduction to pattern matching in functions.
Haskell HW 2
Graph a function, is a point on a line, get the numbers more than 100, break up a list, find the nearest point.
Chapter 2 Test
A short test of some Chapter 2 skills.
Ch 02 Quiz 4
A simple list processing fizz-buzz level quiz. (Recursion.)
Chapter 2 Summary
Useful highlights from the chapter.