Skip to content

Commit 93a500b

Browse files
committed
TreeZipper.delete flipping lefts and rights.
1 parent bb1a74c commit 93a500b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/fj/data/TreeZipper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,9 @@ public Option<TreeZipper<A>> insertDownAt(final int n, final Tree<A> t) {
550550
public Option<TreeZipper<A>> delete() {
551551
Option<TreeZipper<A>> r = none();
552552
if (rights.isNotEmpty())
553-
r = some(treeZipper(rights.head(), rights.tail()._1(), lefts, parents));
553+
r = some(treeZipper(rights.head(), lefts, rights.tail()._1(), parents));
554554
else if (lefts.isNotEmpty())
555-
r = some(treeZipper(lefts.head(), rights, lefts.tail()._1(), parents));
555+
r = some(treeZipper(lefts.head(), lefts.tail()._1(), rights, parents));
556556
else for (final TreeZipper<A> loc : parent())
557557
r = some(loc.modifyTree(new F<Tree<A>, Tree<A>>() {
558558
public Tree<A> f(final Tree<A> t) {

0 commit comments

Comments
 (0)