join x l@(Bin sizeL y ly ry) r@(Bin sizeR z lz rz)
  | delta*sizeL < sizeR  = balanceL z (join x l lz) rz
  | delta*sizeR < sizeL  = balanceR y ly (join x ry r)
  | otherwise            = bin x l r
join x l@(Bin sizeL y ly ry) r@(Bin sizeR z lz rz)
  | delta*sizeL < sizeR  = balanceL z (join x l lz) rz
  | delta*sizeR < sizeL  = balanceR y ly (join x ry r)
  | otherwise            = bin x l r
join x l@(Bin sizeL y ly ry) r@(Bin sizeR z lz rz)
  | delta*sizeL < sizeR  = balanceL z (join x l lz) rz
  | delta*sizeR < sizeL  = balanceR y ly (join x ry r)
  | otherwise            = bin x l r