Introduction to Functional Programming
News Resources Labs Homework Handouts Software Old News Etc.

About the course

This is the homepage for CS 154: Introduction to Functional Programming, a course offered by Fritz Ruehr at the Computer Science Department of Willamette University.

This course provides a broad introduction to programming in the functional style, including motivations, history, programming techniques and theory. Functional programming provides concise and elegant solutions to many problems, using an approach based on mathematics, logic and proof. The course will be taught in Haskell, a powerful, modern programming language which can be used for both mathematical investigations and serious system development. Topics covered will include a broad introduction to computing, symbolic representation of data, list manipulation, recursion, algebraic data types, higher-order functions and type systems. The study of functional programming languages provides a useful foundation and perspective for further study of topics in algebra, logic, programming languages, computer science theory and linguistics.

New (2014) News

Welcome to the Fall 2015 homepage for CS 154!

[I have left some useful links from older versions of the class in an “Old News” section below.]

More news items will appear here soon!

Haskell language resources

(See also the section on software tools below.)

Labs (in rev. chron. order)

Labs will be posted here as they are assigned ... .

Written homework (in rev. chron. order)

Written homework will be posted here as it is assigned.

Some homework may be collected and graded — some may be self-graded with an answer key.

Handouts, examples for lecture, etc.

On-line references

We will be using the Haskell programming language as our main implementation vehicle. There are plenty of links there about the language, how to use it and some implementations (check out the wiki in particular for programming advice).

Installing Hugs (Mac) or WinHugs (Windows)

You can find an easily-installable Mac version of Hugs here:

( link)

For a text editor on the Mac, I recommend the free program TextWrangler; you can also use TextEdit (already on your Mac for free), or vi/vim or emacs, if you know one of those.

On Windows, install the latest version of WinHugs and Crimson Editor (since this is what we use in lecture and lab) as follow:

  1. Install WinHugs; you can find an installation for Windows here (installations for Macs and Linux don't give you the cute Winhugs interface and are a little trickier, but you can find information for them on the same page).
  2. Don't use the default installation directory! Program Files contains a space, which can mess things up: I recommend just C:\Haskell instead. (This should create a directory C:\Haskell\Hugs.)
  3. Create a shortcut on the desktop.
  4. Right click on the shortcut and select Properties.
  5. Modify the Start In: box to set the default directory. In the lab, we use H:\ to default to the home drive (you have to have the drive mapped for this to work). Students setting this up on their own computers can select whatever directory they want to use.
  6. Open WinHugs and set up some options:
    • in File:Options:WinHugs, change the font size to 11 (or whatever you find legible);
    • in File:Options:WinHugs, change the default editor option to:
      "C:\Program Files\Crimson Editor\cedt.exe /L:%d %s "
      (just the stuff between the quotes, not the quotes themselves)
      (note that there are spaces between the 2 words in the folder names and there is a space after the %s!)
    • change the system environment variable Path to include the path to the WinHugs folder.
  7. Install Crimson Editor:
    • create a shortcut on the desktop and change the icon from the rabbit to the paper/pencil;
    • in Tools:Preferences:General: select "use spaces in place of tabs";
    • in Tools:Preferences:Files: Deselect "load recent..." (although students may want to leave this on their own computers);
    • add 2 files to C:\Program Files]Crimson Editor\spec folder:
      haskell.spc   and   haskell.key

Old News

"Pop culture", Haskell advocacy and miscellaneous links

Here are a few fun, interesting or otherwise difficult to categorize links that came up in lecture at various points.

(Haskore vintage.)