## Final Exam

The final exam is cumulative, and will cover most of the materials we discussed in this course, including:

- All lecture materials, with the exception of the class macro and the general notion of monads
- All labs and exercises (but *not* the assignments), with the exception of Lab 8 "make-change-gen"
- Programming in Haskell and Racket

## Format

- Length: 2 hours
- Written on paper. No computers, calculators, notes, etc.
- Closed book
- An aid sheet will be provided to you as part of the exam.
- Here is the exam cover sheet and aid sheets.

## Exam Topics

You may be asked to do any of the following in the midterm:

- Explain and use terminology like: grammar, syntax, semantics, functional programming, tail recursion, currying, eager vs lazy evaluation, strict and non-strict evaluation, lexical vs dynamic scoping, logic programming, type, strong vs weak typing, static vs dynamic typing, algebraic data types, value constructor, type constructor, type class, ad hoc polymorphism, continuation passing style
- Write recursive functions in Racket and Haskell, possibly using pattern matching
- Predict the behaviour of code written in Racket or Haskell
- Use pattern matching in Racket and Haskell
- Implement parts of an interpreter (like in the exercises)
- Expand Racket macros, or write new macros to solve problems
- Write new stream functions and macros in Racket
- Write small pieces of code that uses "shift" and "reset"
- Solve problems using the -< operator, and solve problems (like Lab 8 "make-change")
- Trace through the behaviour of the
*list version*of the -< operator (not the stream version). The code for the -< operator will be provided to you. - Understand and infer types of Haskell values and functions, including generically polymorphic values and functions
- Solve problems involving Haskell abstract data types and the type constructor Maybe
- Infer the implementations of generically polymorphic functions given their type
- Make an algebraic type a member of a type class by implementing the appropriate function
- Transform a function into Continuation Passing Style
- Solve problems using the Functor type class
- Using the Maybe and State monad to solve problems (note: the general notion of monads will not be on the exam)

## Old Exams

Here is an old exam: Fall 2018.

The library maintains an archive of old CSC324H exams. See the Past Exams page.