## Discrete Math

Programming languages is one of the more theoretical disciplines within computer science. As such, PL papers assume a relatively high level of fluency in discrete mathematics. The most important for this class will probably be (ranked very roughly by importance):

Fluency with a few mathematical notations is also essential to understand most PL papers:

Since CS 581 is a prerequisite, Haskell will be our go-to reference point in many situations. We’ll use it as a metalanguage for describing other programming languages, and also frequently use it as an object language when we discuss modular extensibility in functional languages.

Here are a few resources (all free), in case your Haskell skills are a bit rusty.

• A Gentle Introduction to Haskell – Famous for being not-so-gentle, but a really great and concise resource for refining your understanding of Haskell, once you get the basics down. If you just want a refresher, read this.

• Haskell Wikibook – An easy-to-navigate and thorough resource.

• Real World Haskell – O’Reilly’s book-length introduction to Haskell focusing on practical applications.

• Learn You a Haskell for Great Good! – The go-to tutorial that starts from the very beginning. Might be a bit tedious if you just want to brush up, however.

For questions of Haskell style, here are a few resources:

## Standard ML

In the first part of the course, we’ll be studying the Standard ML module system. The good news is, since you already know Haskell, SML shouldn’t be too hard to pick up.

I’ll be using the SML/NJ implementation of SML. For this class, you should be able to use any other popular implementation of the standard, such as Poly/ML without any problems. Many folks online recommend the MLton compiler since it produces very small and very fast executables, but it doesn’t have a REPL, so is probably less useful for our purposes.

Here are some freely available books that can help you learn SML:

Other useful resources:

• Introduction to ML – A nice, super concise introduction.

• A Crash Course on ML Modules – Written for Haskell programmers, so it’s perfect for us!

• SML Basis Library – Documentation for SML’s standard library.

• rlwrap – A very useful Unix utility that adds readline support to any command-line program. The REPLs for SML/NJ and Poly/ML do not use readline by default, making navigation rather annoying. Install rlwrap using your favorite package manager and then launch your REPL with rlwrap sml or rlwrap poly and you’re good to go!