CMU 15-150: Principles of Functional Programming
15-150 teaches functional programming in Standard ML: types, recursion and induction, higher-order functions, and reasoning about programs as mathematical objects. It runs alongside 15-122 in the CMU CS core, and for most students it's the first time programming and proof become the same activity.
Fennie is independent and not affiliated with Carnegie Mellon University. This is an unofficial study guide.
What makes it hard
Imperative habits actively interfere: there are no loops, no mutation, and no 'just track the variable' debugging. Everything is recursion, types, and induction. The type checker rejecting your code feels hostile until it becomes the best teacher in the building. Exams ask for proofs about programs, which is a different muscle than producing them.
What you'll cover
- • Standard ML and type systems
- • Recursion and structural induction
- • Higher-order functions
- • Datatypes and pattern matching
- • Proofs about programs
- • Parallelism and cost basics
The 15-150 study guide
How to study for CMU 15-150, step by step.
- 1
Surrender the imperative habits consciously
Trying to write loops in disguise is the universal week-two mistake. For each problem, ask what the recursive structure of the data is. In 150, the data's shape dictates the code's shape.
- 2
Read type errors as guidance, not rejection
The ML type checker is the most honest tutor you'll ever have. When it complains, work out what type you promised versus what you produced. That analysis is the actual learning.
- 3
Practice induction proofs alongside the code
Exams ask you to prove properties of functions, and the proof structure mirrors the recursion structure. Every time you write a recursive function, sketch its induction proof. The pairing is the course's central idea.
- 4
Hand-evaluate expressions step by step
Tracing evaluation, especially with higher-order functions, is a tested skill. Practice reducing expressions on paper until you can predict what any composition of maps and folds produces.
- 5
Do many small problems, not few big ones
Functional fluency builds through volume of small recursive problems. The homework alone isn't enough volume for most people; supplement with extra exercises weekly.
Today
Today's 15-150 plan
What a Fennie Daily Plan looks like for 15-150. Yours is built from your own syllabus and adapts every day to your deadlines and progress.
First plan free, no card required. Fennie is independent and unaffiliated with your school.
FAQ
Is 15-150 hard?
It's disorienting more than difficult: no loops, no mutation, programs as math. Students who consciously drop imperative habits and do high volumes of small recursive problems usually convert mid-semester from confused to converted. Fighting the paradigm is the only losing strategy.
Why does CMU teach Standard ML in 15-150?
ML's type system and pattern matching make the course's central idea (programs you can prove things about) concrete and enforceable. The language is the point: its constraints teach the reasoning style, which then transfers to every language you'll use after.
How do I study for 15-150 exams?
Three drills: write recursive functions from datatype definitions, hand-evaluate higher-order expressions step by step, and practice structural induction proofs until the proof shape falls out of the recursion shape. All three appear on every exam.
More CMU courses
15-112: Fundamentals of Programming and Computer Science
15-112 is CMU's famous accelerated introduction to programming in Python: control flow, functions, data structures, recursion, OOP, and efficiency, ending in an open-ended term project. Its public course website and the related CMU CS Academy platform give it a search footprint far beyond Pittsburgh.
15-110: Principles of Computing
15-110 is CMU's gentler introduction to computing, covering Python programming plus computing concepts like data representation, algorithms, and the limits of computation. It's designed for students who aren't CS majors or who want a runway before 15-112, and it's one of the largest courses on campus.
15-122: Principles of Imperative Computation
15-122 teaches imperative programming with correctness front and center: contracts, loop invariants, and reasoning about code in the C0 teaching language before transitioning to real C. It covers data structures from stacks and queues through hash tables, trees, and graphs, and it's the second course of the CMU CS core.
15-213: Introduction to Computer Systems
15-213 is the famous CS:APP course: data representation, x86-64 assembly, caches, memory, linking, exceptions, virtual memory, and concurrency, taught through the legendary lab sequence (bomb lab, attack lab, cache lab, malloc lab, shell lab, proxy lab). Its textbook and materials are used worldwide, making it one of the most-searched CS courses on the internet.