Haskell track: assignment 2: basics


Goals

In this assignment you will continue learning the basics of Haskell by writing a lot of simple functions.


Language concepts covered this week


Reading

Read the first four chapters of the Gentle Introduction to Haskell if you haven't already.


Program to write

For this week, you will be solving a number of simple problems by writing a bunch of simple functions in a file called lab2.hs. We've provided a template for your code in this file. What you have to do is to fill in the function definitions marked "TODO". In each case, we supply the type signature of the function which your code has to adhere to.

Here are the problems you have to solve:


To hand in

Your program lab2.hs.


Supporting files


References