Commit 624bf4e5 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢

SumBag: Fix typo in rotate1

This caused erroneous calls to rotateDoubleRight instead of rotateSingleRight,
thus disbalancing the tree and possibly failing to pattern match.
parent c9354b7d
......@@ -135,7 +135,7 @@ balance1 a left right
let Node _ _ lleft lright = left
sizeLL = size lleft
sizeLR = size lright
in if sizeLL < sizeLR then rotateSingleRight a left right else rotateDoubleRight a left right
in if sizeLR < sizeLL then rotateSingleRight a left right else rotateDoubleRight a left right
-- No subtree is too heavy, we can just form a new tree straight away
| otherwise = node a left right
......
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