Assigned: Wed 30 Mar 2005 Due: Wed 6 Apr 2005 These exercises
are concerned with a couple of new language features in Haskell,
classes and instances; they also introduce Haskell's IO
(input/output) facilities. Between them, these features will
form the basis for our investigation of Haskell's notion of a
monad, an idea with important theoretical origins, but also very
practical uses in Haskell. For background on these features,
read the textbook on pages 31-33, 39, 76-80 and Chapter 10
(which discusses IO). I will also give some background on these
ideas in lecture and lab. Note that classes and instances in
Haskell correspond very roughly to interfaces and
implementations (keyword "implements") in Java (this intuition
may help you understand how they are used in structuring larger
programs and libraries). Hey!: here is some test data for Tree
and BTree equality. Make instances of both the Functor and Eq
classes for BTrees. Note that you actually have to write a new
function in the second case; also, you will