Skip to main content Skip to navigation

CS141 Functional Programming

CS141 15 CATS (7.5 ECTS) Term 2

Availability

Option - CS, CSE, CSBS and DM

Prerequisites

None

Academic Aims

  • The prinicpal aim of this module is to introduce students to the functional programming paradigm.

Learning Outcomes

  • Students should be able to understand the differences between imperative and functional programming, apply functional programming techniques, and write programs in Haskell.

Content

  • Differences between imperative and functional programming
  • Functional programming basics: expressions and reduction
  • Types, including parametric polymorphism
  • Ad-hoc polymorphism via type classes
  • Recursive and higher-order functions
  • Algebraic data types
  • Strict vs Lazy evaluation
  • Equational reasoning and inductive construction
  • Functors, Applicatives, Foldables, Traversables, and Monads
  • Type-level programming

Books

  • Graham Hutton: Programming in Haskell, (2nd Edition)
  • Miran Lipovaca: Learn you a Haskell for a great good!

Assessment

Two pieces of coursework (15%) (25%), 2 hour examination in Term 3 (60%).

Teaching

30 one-hour lectures, 10 lab sessions