/EDUCATION/COMP2209
COMP2209: Programming III
Second Year, 2024/25 · Semester 1
Overall mark 83%
Functional programming in Haskell, including higher-order functions, lambda calculus, and property-based testing.
SKILLS Functional Programming · Property-Based Testing · Parsing · Performance Profiling
TECHNOLOGIES Haskell · GHC · HUnit · QuickCheck
What the module covered
This module introduced functional programming through Haskell, covering pattern matching, recursion, higher-order functions, algebraic data types, type classes, and lazy evaluation. It also explored functors, applicatives, monads, and lambda calculus, with a look at functional techniques in Java and JavaScript.
The coursework consisted of programming challenges, including parsing and an interpreter. I used HUnit for example-based tests and QuickCheck to check properties across generated inputs, and profiled the implementations with GHC’s runtime tools.
What I took from it
Combining example-based and property-based tests was particularly useful. A few hand-picked inputs could check expected results, while QuickCheck helped look for discrepancies across a much wider range of expressions. My report also distinguished keeping the code simple from making it efficient: concise recursive code still needed performance checks.