Commit c9354b7d authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢

SumBag: Fix typos in error messages and comments

parent c2feee5d
......@@ -113,7 +113,7 @@ rotateSingleRight _ _ _ = error "rotateSingleRight called with empty left tree"
rotateDoubleLeft :: Monoid a => Element a -> Tree a -> Tree a -> Tree a
rotateDoubleLeft a x (Node _ c (Node _ b y1 y2) z) = node b (node a x y1) (node c y2 z)
rotateDoubleLeft _ _ _ = error "rotateDoubleLeft called with too small left tree"
rotateDoubleLeft _ _ _ = error "rotateDoubleLeft called with too small right tree"
rotateDoubleRight :: Monoid a => Element a -> Tree a -> Tree a -> Tree a
rotateDoubleRight c (Node _ a x (Node _ b y1 y2)) z = node b (node a x y1) (node c y2 z)
......@@ -136,7 +136,7 @@ balance1 a left right
sizeLL = size lleft
sizeLR = size lright
in if sizeLL < sizeLR then rotateSingleRight a left right else rotateDoubleRight a left right
-- No subtree is too heave, we can just form a new tree straight away
-- No subtree is too heavy, we can just form a new tree straight away
| otherwise = node a left right
addOnce :: Semigroup a => Element a -> Element a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment