laughinghan/mathquill — comment on commit 74bb48343ed0b72556b894a073c7ea437fc2e6d0
File:  line 0
By jayferd:

Looking over it now - I see what you mean. For `siblingify()`, I think something needs to be done to reduce the number of arguments. I'm looking at trying to factor it into its logical two parts. What if you did something like this:

``` js
function setNext(self, next) {
self.next = next;
if (next) {
next.prev = self;
}
else {
self.parent.lastChild = self;
}
}

function setPrev(self, prev) {
self.prev = prev;
if (prev) {
prev.next = self;
}
else {
self.parent.firstChild = self;
}
}
```