/comp3400

Exercises and assignments for COMP3400 (Functional Programming).

Primary LanguageHaskell

comp3400

Exercises and assignments for COMP3400 (Functional Programming1). Done in Semester 1, 2021 with lectures presented by Paul Vrbik.

assignments

Assignments were relatively straightforward, with few questions. Where able, they were solved with great overcomplication and functional programming arcana ^_^

exercism

The course used Exercism for weekly exercises, some were given each week as homework. All the exercises completed are in the exercism folders.

These were, at times, quite interesting. We had motivation and freedom to explore the abstractions of Haskell.

A few highlights are:

  • DNA: most simple use of traverse in parsing, fascinating in your first weeks of Haskell.
  • Brackets: matching paired brackets in a string, a recursive algorithm with an implementation using foldr.
  • Yacht: scoring a mildly interesting dice game.
  • Dominoes: arranging dominoes such that they form a cycle.
  • Deque: doubly-linked list using mutable state and IO.
  • Garden: more complex parsing and logic to process input with transposition (also has a playground with Foldable and Applicative!).

Footnotes

  1. Nominally, the course also covers logic programming, but this hasn't happened for several years.