You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// When there is no left node walk the parents until the parent's left
// node is not equal to the previous child. This will be the previous
// node.
for iter.node.left == nil {
parent := iter.parents.Pop()
for parent != nil && parent.left == iter.node {
iter.node = parent
parent = iter.parents.Pop()
}
iter.node = parent
return iter.limitIterator()
}
I guess you want to do something like this
// When there is no left node walk the parents until the parent's left
// node is not equal to the previous child. This will be the previous
// node.
if iter.node.left == nil {
for iter.node.left == nil {
parent := iter.parents.Pop()
for parent != nil && parent.left == iter.node {
iter.node = parent
parent = iter.parents.Pop()
}
iter.node = parent
}
return iter.limitIterator()
}
Am I correct?
The text was updated successfully, but these errors were encountered:
Hi, this looks like a bug.
I guess you want to do something like this
Am I correct?
The text was updated successfully, but these errors were encountered: