CS 331 Spring 2009  >  Assignment 3

CS 331 Spring 2009
Assignment 3

Assignment 3 is due at 5 p.m. Thursday, March 5. It is worth 25 points.

Procedures

E-mail answers to the exercises below to ffggc@uaf.edu, using the subjectPA3”.

Exercises (25 pts total)

Exercise A — Haskell Lists

Purpose

In this exercise, you will write some simple Haskell functions involving lists.

Instructions

Write a Haskell module PA3, contained in the file PA3.hs. Module PA3 should include the following public functions/variables.

General Requirements

Test Program

I have written a test program: pa3_test.hs. If you compile and run your package with this program (unmodified!), then it will test whether your package works properly.

If you are using Hugs, then put your file and the test program in the same directory, and do

> :l pa3_test.cpp
> main

(Note that “> ” represents the Hugs prompt, and is not to be typed.)

Do not turn in pa3_test.hs.


CS 331 Spring 2009: Assignment 3 / Updated: 2 Mar 2009 / Glenn G. Chappell / ffggc@uaf.edu Valid HTML 4.01!