clojure.lang.PersistentTreeMap.BalanceLeftDel C# (CSharp) Метод

BalanceLeftDel() статический приватный Метод

static private BalanceLeftDel ( object key, object val, Node del, Node right ) : Node
key object
val object
del Node
right Node
Результат Node
        static Node BalanceLeftDel(object key, object val, Node del, Node right)
        {
            if (del is Red)
                return MakeRed(key, val, del.Blacken(), right);
            else if (right is Black)
                return RightBalance(key, val, del, right.Redden());
            else if (right is Red && right.Left is Black)
                return MakeRed(right.Left.Key, right.Left.Val,
                           MakeBlack(key, val, del, right.Left.Left),
                           RightBalance(right.Key, right.Val, right.Left.Right, right.Right.Redden()));
            else
                throw new InvalidOperationException("Invariant violation");
        }