Commits

Maxime Buquet committed d4f1159

Zip module exception name changed

Comments (0)

Files changed (1)

 
-exception EmptyZip
+exception OutofBounds
 
 type 'a t = 
     | Empty
 let is_empty z = z = Empty
 
 let pop = function
-    | Empty -> raise EmptyZip
+    | Empty -> raise OutofBounds
     | Zip (_, _, v, _) -> v
 
 let right = function
     | Zip (_, [], v, []) -> Zip (true, [], v, [])
-    | Empty | Zip (_, _, _, []) -> raise EmptyZip
+    | Empty | Zip (_, _, _, []) -> raise OutofBounds
     | Zip (b, rl, v, n :: ll) -> Zip (true, v :: rl, n, ll)
 
 let left = function
     | Zip (_, [], v, []) -> Zip (false, [], v, [])
-    | Empty | Zip (_, [], _, _) -> raise EmptyZip
+    | Empty | Zip (_, [], _, _) -> raise OutofBounds
     | Zip (b, n :: rl, v, ll) -> Zip (false, rl, n, v :: ll)
 
 let push x = function