Commits

afiskon committed 4e922f2

minor changes

Comments (0)

Files changed (1)

           | 2 -> move_down ()
           | _ -> move_up ()
 
-let rec gen_maze' m lst htbl part_len =
-  if lst == [] then m
-  else let (x, y) = List.hd lst in
+let rec gen_maze' m lst htbl part_len = match lst with
+  | [] -> m
+  | (x, y) :: tail ->
     if is_standalone_cell m x y
     then
     begin
         else m.(x).(y).move_left <- true
     end
     else ();
-    gen_maze' m (List.tl lst) htbl part_len
+    gen_maze' m tail htbl part_len
 
 let gen_maze width height part_len =
   let m0 = empty_maze width height