Introduction
I had the pleasure of serving as the summer instructor for 15-150, the introduction
functional programming class for computer science students at Carnegie Mellon, in
the Summer 2023 semester.
This course typically serves as the second or third course in the traditional
computer science undergraduate sequence, a privilege which not many other universities
get to enjoy, as functional programming is often considered a niche topic.
Despite this, I (and CMU) believe this to be of the utmost importance. A disciplined,
type-oriented, safety-first view of programming can be of utmost benefit to burgeoning
computer science scholars, and I have often heard feedback from students that it is has
a transformative view on their perspective of computer science in general.
To that end, I have made my lecture materials from my iteration of the course available
for free on the Internet. Please feel free to use this knowledge in any way that you see
fit, and I hope that it aids you in your future endeavors.
Lectures
"Welcome to the rest of your life!"
"Equivalences save lives."
"Recursion is the bread and butter of doing anything in a functional language."
"Proving things about pretty much any kind of data you can imagine."
"Trees are the most fundamental data structure."
"A step is not always a step. We care about analyzing performance mathematically."
"What do we do when we have infinitely many processors?"
"Code reuse at different types, without breaking any of our safety properties."
"We can take in functions and also return functions, like any other value."
"You shouldn't have to wait on something unrelated when you can do work right now."
"CPS is the difference between writing instructions now, or remembering them later."
"Exceptions make mathematical thinking harder."
"Regular expressions are one of the most practical things you can learn."
"SML has one of the most sophisticated module systems of any programming language."
"Functors will show us how we can write code that depends upon modules."
"Red-black trees are a very good application of modules for protecting invariants."
"With sequences, we can keep immutability and also have the benefits of arrays."
"With laziness, only pay for for the computations you want to use."
"We invented immutability and purity, but we do not serve them. It's OK to be a little mutable."
"A long time ago, programming languages did not exist."
"We are solving an unsolvable problem."
"You can never go back, because you are forever a functional programmer."
Supplemental Lectures
"From one language to another."