DM22, Spring 2006 - Weekly Note 2


Lecture February 14

More about Haskell: Algebraic types, type classes, built-in types and classes. More Haskell syntax, including list comprehensions. Useful functions on lists.

Reading

Chapter 2 and sections 3.4-6 in Bird. Slides: Haskell Intro II. We have also covered parts of sections 4.1-5. For simple examples of Haskell code, see this file.

Remarks

As mentioned on the last weekly note, the book touches most of Haskell in the first few chapters. As a consequence, you have met a lot of Haskell in a short time, most of which you have not tried out yourself yet. The next period of the course (several exercise classes, and lecture February 28) will focus on doing some actual programming in Haskell.

One aim of the book is to teach functional programming as a mathematical activity. In this course, we initially will concentrate on learning Haskell the language, and getting some code running. Although it is one of the key virtues of functional programming that it is much easier to reason about than imperative programming, we will postpone this subject until a bit later in the course. Hence, for the moment you can (and probably should) skip all parts of the reading sections which deal with proofs of identities, as well as those dealing with the undefined value ("bottom") and strict and non-strict functions. We will return to these later. Put some time into reading the slides, and browse some of the material under point "Additional Material" at the main course page.


Lecture February 21

This lecture is cancelled (the extra lecture on February 9 takes its place). You are advised to spend time reading the non-proof parts of sections 4.1-5 thoroughly (we only had time to a skimpy coverage at the last lecture). If you can understand the definitions of the (standard prelude) functions defined there, your knowledge of Haskell is well up to speed.

Reading

Non-proof parts of sections 4.1-5 in Bird.


Exercises February 22

Exercises 1.4.2, 2.1.6, 2.2.1, 2.2.2, 2.7.2, 4.1.4, 4.2.1, 4.2.2, 4.3.7, 1.6.2, 2.2.3, 2.4.4, and 4.3.3 in Bird.


Maintained by Rolf Fagerberg (rolf@imada.sdu.dk)