Exercise set 3.


In this course week, we will be introducing a mini project that you will be working on for the next 3 weeks. And as such the exercises will be coursory and intended to prepare you for the task.

You should all read chapter 5 of Programming in Haskell by Graham Hutton, which explains list comprehensions (we will implement list comprehensions as part of the first Oblig).

Students who are struggeling with recursive functions are encouraged to also read chapter 6.

Highly engaged students are encouraged to read the Hutton and Wright's "calculating an exceptional machine" cited at the end of page 108.

In this exercise set, you will find exercises that you can use to test yourself, that you have understood the material covered in the course up to now.

Programming in Haskell


Solve the following exercises from Programming in Haskell by Graham Hutton.

Morse Comprehensions


Recall the exercise about morse code from week 01, and find the alphabet listed below here for convenience.

      A .-            N -.
      B -...          O ---
      C -.-.          P .--.
      D -..           Q --.-
      E .             R .-.
      F ..-.          S ...
      G --.           T -
      H ....          U ..-
      I ..            V ...-
      J .---          W .--
      K -.-           X -..-
      L .-..          Y -.--
      M --            Z --..

List Comprehensions (challenge)