Index of /~stough/705/coursedir/balanced

Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - [TXT] balanced-inefficient.ml 05-Mar-2009 23:04 2.3K [TXT] balanced-test.ml 07-Mar-2009 15:33 6.1K [TXT] balanced.ml 22-Mar-2009 19:22 4.2K [TXT] random1.txt 27-Feb-2009 17:02 249 [TXT] random2.txt 27-Feb-2009 17:02 2.4K [TXT] random3.txt 27-Feb-2009 17:02 24K
To test your solution to Assignment 2, do the following.

Load my balanced.ml (or another fast correct implementation):

  # #use "balanced.ml";;

Load testing harness:

  # #use "balanced-test.ml"
  ...
  val test :
    (int list -> int list list) -> (int list -> int list list) -> bool -> unit = <fun>

Apply function test to correct balanced function, and give result a name:

  # let f = test balanced;;
  val f : (int list -> int list list) -> bool -> unit = <fun>

Load your balanced function:

  # #use "my-balanced.ml";;

Apply f to your function and false:

  # f balanced false;;

If this reports errors because you forgot to remove duplicate answers, try

  # f balanced true;;

to see if that's the only problem.

Look at balanced-test.ml to see what the tests are.