Afterwritingthiscode,evenIdonotunderstandtheprecisedetailsofhowbalancingworks.IconsultedChrisOkasaki'spaper"Red-Black Trees in a Functional Setting"andtranscribedthecodetousedependenttypes.Luckily,thedetailsarenotsoimportanthere;typesalonewilltellusthatinsertionpreservesbalanced-ness,andwewillprovethatinsertionproducestreescontainingtherightkeys.