it is now 30% shorter and much faster, using an array instead of a functional
map. It also uses continuation passing style instead of an explicit stack.
But it no longer produces PostScript output.
The program uses a simple depth first search. An interesting alternative
algorithm involves keeping track of sets of connection cells and breaking
walls to unify the sets until you have a spanning tree. That should be easy
to code in OCaml but I think it will generate mazes that are much harder to
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
Caml-list mailing list. Subscription management:
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs