This zip file now includes the binary tree code that we wrote in class today.
This page documents what we do in class. It contains Java programs that we will discuss in class, reading assignments, simple homework exercises that you can work on for practice and exam preparation (not for credit), and links to other sources of information.
This zip file now includes the binary tree code that we wrote in class today.
The second exam is on Tuesday, April 30 (according to the university's final exam schedule).
The exam will be over the first half of Chapter 8 (up to Recursive data structures) from the Learn You a Haskell book.
For the exam, know the following material about Haskell.
data
definitionsHere is a file that contains review problems for the exam.
Here are the list and binary tree examples that we used in class today.
Here are the examples that we used in class today.
Here are the examples that we used in class today.
The first midterm exam is today.
Remember that the first midterm exam will be this Tuesday, April 2. See the review material from March 7.
Here is a syntax diagram for Haskell's data
declarations.
Here are the examples that we did in class today.
Here is a comparison of a simple "sum type" in Java and Haskell.
Here are the examples that we did in class today.
Here is an explanation of some advantages of Haskell's "sum types".
Read Sections 1.1 - 1.5 (pages 3 - 19) about sets from The Book of Proof.
Spring Break - No class today.
Spring Break - No class today.
The first midterm exam will be Tuesday, April 2.
The exam will be over Chapters 1-6 from the Learn You a Haskell book.
For the exam, know the following material about Haskell.
Here is a file that contains review problems for the midterm exam.
Read Chapter 8 from the Learn You a Haskell book.
Here are the examples that we did in class today.
Here is another explanation of modules from Monday Morning Haskell.
Here are the examples that we did in class today.
Today we will cover one more idea from higher order functions. We will look at folds.
Read Chapter 7 from the Learn You a Haskell book. The two most important sections from this chapter are the first and the last sections.
Solve the following HOF problems from CodingBat.
(Here is CodingBat's explanation of hof in Java.)
Here is the code that we wrote in class today.
Use Haskell to solve these exercises on higher order functions.
Here is a list of all the Haskell programming exercises so far.
Today we will cover more ideas about higher order functions. We will look at lambda expressions, curried functions, partially applied functions, partial functions, and composition.
Solve the following recursion problems from CodingBat. (You can also try to solve these using Haskell.)
Here is the code that we wrote in class today.
Solve the following recursion problems from CodingBat. (You can also try to solve some of these using Haskell.)
Here are several explanations of recursion taken from several different textbooks.
Here are Haskell examples of higher order functions.
Here is the code that we wrote in class today.
I will be in class at 1:00 when school reopens.
Here is the code that we wrote in class today.
Here are two examples of geometric recursion.
Remember to read Chapter 6 from the Learn You a Haskell book.
Here are the examples that we did in class today.
Use recursion to solve these exercises.
Here are the examples that we did in class today.
Read Chapter 6 from the Learn You a Haskell book.
No class today because of the weather.
Here are Haskell and Java examples of recursive functions on lists.
Here is a Haskell file with a lot of examples using equations, patterns, and guards.
Here is a syntax diagram for Haskell's equations, patterns, and guards.
Use equations, patterns and guards to solve these function exercises.
JavaScript now has pattern matching, but JavaScript calls it "destructuring".
Read Chapter 5 from the Learn You a Haskell book.
Read Chapter 4 from the Learn You a Haskell book.
Read Chapter 2 from the book Real World Haskell. This chapter covers the same material as the first three chapters of Learn You a Haskell. It is a good idea to read an alternative explanation of all these concepts.
Here are some exercises using list comprehensions.
Simple homework exercises or quick experiments can be done online using this Haskell interpreter.
Read Chapter 3 from the Haskell book.
Download and unzip this small version of the Haskell interpreter.
Read the following introduction to Haskell (from this book)
Here are some Haskell exercises that you can work on.