CSCI 330 midterm and exam page, spring 2026
Midterm
There will be one midterm, held in lecture on Wednesday February 25th,
to be done on paper.
You will have 80 minutes to complete the midterm once you begin:
closed book, closed notes, but you are permitted to bring one
double-sided 8.5x11" reference sheet ("cheat sheet").
As with all work this term, midterms and exams are individual exercises,
all work submitted is expected to be your own.
The midterm will cover all material covered in labs, lectures, and review sessions
up to and including the review lecture of Monday February 23rd. More specific
details and question styles will be posted here as we get closer to the midterm date.
Topics and knowledge objectives, 2026 midterm:
There will be four questions, equally weighted. Some questions will
have multiple parts,
but tailored so the total question can be completed in ~20 minutes.
There will be a mix of applied (coding) and theoretical (discussion) questions,
with the list below outlining the knowledge/skills you should have going into the midterm.
- 'Pure' functional programming:
- be able to describe/discuss the key features that distinguish pure from impure functional programming code
and the potential advantages/drawbacks of pure functional code
- be able to take functionally impure code in common lisp and produce a functionally pure equivalent
- Common lisp implementation of lists:
- be able to describe/discuss how lists are implemented in common lisp, and the implications
with respect to efficiency and side effects
- be able to evaluate lisp code and determine where side effects will/will not be an issue and why
- Tail recursion:
- be able to describe/discuss what tail recursion is, why it is significant with
regards to compilation and runtime efficiency, and
to identify functions that are/are not tail recursive
- be able to discuss the role of accumulators in tail recursive functions and be able
to use them in produce tail-recursive equivalents of functions that are not initially
tail recursive
- General lisp features and functionality:
- you should have reasonable fluency in the various lisp features we have covered
in the labs/lectures to date: make good use of your 'cheat sheet' for aspects you
feel less confident with
- fundamentals you should be able to use effectively would include features such as:
- declaring and using functions and variables (defun, defvar, let blocks, setf)
- type checking (integerp, listp, etc) and equality checking (=, eq, equal, etc)
- list handling functions (car, cdr, cons, length, nth, null, etc)
- basic control (if, cond)
- basic i/o (read, format)
- the use of optional parameters and default values (&optional)
- the use of variadic functions (can accept any number of parameters, &rest)
- you should be aware of and able to summarize the nature/significance of
some of the more unusual features, including dynamic scope, functions that return
multiple values, and keyword-based parameter passing (&key)
- Higher-order functions:
- be able to describe/discuss what a higher order function is, and be able to both
write and use higher-order functions effectively
- know the difference between funcall, apply, and eval, and be able to use them
effectively
- be able to write and use lambda functions
- Let-over-lambda:
- be able to describe/discuss what let-over-lambda is (in the context of common lisp)
and its implications/significance
- be able to write and use simple let-over-lambda constructs (though obviously the
complexity here would be limited in order to keep the question answerable in 15-20 minutes)
- Macros:
- be able to describe the role of macros in common lisp
- be able to write simple macros and to show expansions of simple macros when applied
to source code
- understand and be able to use the backtic, comma, and ,@ notation correctly within macros
- understand the signficance of gensym and be able to use it appropriately within macros
Several examples of past midterms are available:
The final exam will be an in-person (paper/pencil) exam held during the scheduled
VIU exam period: (date, time, and location TBA)
The final exam will be a comprehensive 3-hour exam with a mix of theory and applied
questions, and can draw from any part of the course (lectures, labs, midterm, review sessions).
The final is likely to place slightly greater emphasis on the latter half of the
course, but to include questions that relate that content back to material from
the first half of the course.
As with the midterm, the final exam is closed notes and closed book, no electronics permitted,
but you are permitted one 8.5x11" double-sided reference sheet ("cheat sheet").
A review/prep session for the final exam will be held during
the final course lecture (Wed. Apr 8).
Old exams
Note that each year a slightly different collection
of topics are investigated, and some have been online, some have been
take-home, some have been VIULearn, and some have been in-person,
so don't be too worried if
something on an old exam looks completely unfamiliar.
Some past offerings also used sets of quizzes rather than a midterm,
so those final exams had a lesser emphasis on material already covered
by one or more quizzes.
This year's final exam will be a cumulative exam, but most of the
lisp-related questions will be relating different features/aspects of lisp
to the language design and implementation topics we've been studying.
- 2024: final
- (lots of the post-covid/pre-AI exams were done through VIULearn,
with question styles that aren't really suitable now that we're back to paper/pencil)
- 2019: final
- 2018: final
- 2017: final
- 2016: final
A few old practice sessions, working out sample solutions for some old questions:
2016 Q1:
sample solution,
youtube
2016 Q2:
sample solution,
youtube
2016 Q11:
sample solution,
youtube (for years where we get to smart pointers)