git.iko.soy/rowtype-yoga/purescript-yoga-tree
on master help sign in
Fix bug in `first`
commitc9cfe826bba1bdea6b4b35a04f3d9e41dac42d55 authorJordan Martinez <jordanalex.martinez@gmail.com> dateFri 19 Apr 2019, 18:07 (7 years ago) parent510d1e1
1 file changed+2−2
src/Data/Tree/Zipper.purs+2−2
src/Data/Tree/Zipper.purs+2−2
@@ -50,11 +50,11 @@ prev (Loc r) =
5050-- -- | Move the cursor to the first sibling.
5151first :: forall a. Loc a -> Loc a
5252first l@(Loc r) =
53− case r.before of
53+ case reverse r.before of
5454 Nil -> l
5555 c:cs -> Loc r { node = c
5656 , before = Nil
57− , after = (reverse cs) <> r.after
57+ , after = cs <> r.after
5858 }
5959
6060-- -- | Move the cursor to the last sibling.