CMSC 22300: Functional Programming

Spring Quarter, 2010 
MWF, 1:30 pm - 2:20 pm
Ryerson 277


Index

Announcements
Instructor Contact Info
Course Description
Course Textbooks
Programming Exercises
Course Policies
Course Mailing List
Homework Assignments
Lecture Notes
Handouts
Sample Code
Programming in SML
SML/NJ FAQ


Announcements/Updates

The first class will be on Monday, March 29, 2010 at 1:30pm in Ry 277.

A Midterm Exam will take place in class on Monday, May 3.

The Final Exam will take place 10:30am-12:30pm on Friday, June 11 in Ryerson 277.

Instructor Contact Info

Name Role Office Office hours Phone Email
David MacQueen Professor Ryerson 250 By appointment 2-4980 dbm@cs.uchicago.edu
George Kuan TA Ryerson 257B 5:00-6:00pm Tuesday 2-9110 gkuan@cs.uchicago.edu

Course Description

This course presents the functional programming paradigm, based on the idea of functions as "first-class" values that can be computed and operated on like other data. Functional languages provide great power of expression while maintaining simplicity, making it easier to write correct and maintainable software. Functional programming has gradually found new applications in areas like finance, telecommunications, and graphics. The essential feature of treating functions as values has also been added to a broad range of conventional languages, such as Python, C#, and the new Go language from Google.

The course will use the languages Haskell and ML as representatives of the two main schools of functional programming, the pure and the impure (i.e. eliminating or permitting side-effects). After learning the basic elements of these languages, we will explore functional programming techniques that can be exploited in many areas of application. We will compare the functional paradigm with the related paradigm of object oriented programming. Finally we will include an brief overview of concurrent functional programming in ML and Haskell.

Students should have experience programming in one or more programming languages, and familiarity with basic concepts of naive set theory and logic would be helpful. Inductive definitions and inductive proofs will play a central role.

Course Textbook

The textbooks for the course are:
  1. ML for the Working Programmer (2nd Edition) by Laurence C. Paulson, Cambridge University Press (paperback).
  2. Real World Haskell by John Goerzen and Don Stewart. This book is available on-line in an almost final draft, as a Kindle edition, and as a paperback from O'Reilly.
There are a number of other books on Standard ML and Haskell. The following two are particularly useful:

Programming Exercises

This course involves learning functional programming through writing programs in both Standard ML and Haskell. There are several good sources of documentation and tutorials for SML/NJ available online, and some of these are given in the course SML/NJ page. You can install a copy on your own machine (Mac OS X, Linux, or Windows) by following the instructions at http://smlnj.cs.uchicago.edu/dist/working/110.72/index.html. Standard ML is installed on most department servers and workstations, and is located at /opt/smlnj/smlnj-110.71/bin/sml. If you are using a department machine, you might want to add the directory /opt/smlnj/smlnj-110.71/bin to your PATH.

You can find information about Haskell at the Haskell home page http://www.haskell.org/. We will be using the GHC Haskell compiler in this course, and you should install the "Haskell Platform" found at http://hackage.haskell.org/platform. The GHC compiler is also installed on most department machines, in /usr/bin (e.g. /usr/bin/ghci for the interactive compiler).

Programming assignments should be submitted by email to the course TA. They should be sent as attachments, either plain text for single source files, or zip archives or tarballs for multi-file programs.

Course Policies

Course Mailing List

A mailing list has been created for the course. The address is cmsc22300@mailman.cs.uchicago.edu. The web page for the mailing list is at a https://mailman.cs.uchicago.edu/mailman/listinfo/cmsc22300.

Homework Assignments

Here are links to the homework assignments.

Midterm Solutions

Midterm 1 Solutions
Midterm 2 (final) Solutions

Lecture Notes

Handouts

Papers and Presentations

Additional Useful Links


Dave MacQueen
Last modified: Wed Dec 5 16:46:41 CST 2007