Skip to content

Assignments

An overview of assignments will be posted here as they're published. To start:

  • HW 1: peoPLe — get oriented to the syllabus, the history and culture of programming languages, and how this course works.
  • HW 2: FUNctional Programming — recursion, pattern matching, and higher-order functions in Haskell, ending by building arithmetic itself out of a single function and a number.
  • HW 3: Lists, Datatypes, and a Stack Machine — more list and higher-order function practice, a first datatype of your own, and implementing a stack machine that evaluates arithmetic expressions.
  • HW 4: Little Languages (Random Art and Regular Expressions) — building an evaluator and random generator for a little graphics language, and a lazy, list-based regular-expression matcher.
  • HW 5: PicPlot Part 1: Compiling — writing a compiler in Haskell for piq, a small pen-plotter drawing language, from abstract syntax to plotter Python, including environments, loops, and procedures.
  • HW 5: Environment Walkthroughs — worked, step-by-step traces of the environment through assignment, loops, and procedure calls, for the compiler you build in HW 5.
  • HW 6: PicPlot Part 2: Parsing — writing a parser for piq with parser combinators, from source text to the abstract syntax your HW 5 compiler consumes, including precedence, associativity, blocks, loops, and procedures.
  • HW 7: Discovering Monads by Building Interpreters — four versions of one tiny evaluator (plain, error-reporting, counting, tracing), then refactoring all four into monadic form to discover pure and >>= as the reusable plumbing.
  • HW 8: Lambda Calculus — comparisons, Maybe, lists, and binary trees encoded as functions, Fibonacci with no recursion, and the 3n + 1 step count built with Y, all in the lc interpreter.

Coming soon

The rest of the assignment list will be posted here as the semester develops. Assignments are submitted on Gradescope.