learing haskell

Peter Abbot Abbot2P@wcc.govt.nz
Mon, 17 Sep 2001 10:25:55 +1200


I am learning haskell for a course on programming languages that I am doing
and I am  having some trouble getting my head around functional programming.

The problem that we are trying to solve is given a certain state, list all
of the possible states that you could go through. I was thinking of having
the ouput being a collection of lists but cant figure out how to append two
list together to get something like:
[[1,2,5], [1,2,8], [1,2,9], ...]

The approach I am taking is that I have defined a type of State which is
equal to Integer. I then have a function that takes a State and return a
list of States that can be reached from that state. It is coming up with an
algorithm to do both a depth first and breadth first search.

Any suggestions would be greatly welcome.