diff --git a/fcore/persistent-vector.sml b/fcore/persistent-vector.sml index e762951..41c8da2 100644 --- a/fcore/persistent-vector.sml +++ b/fcore/persistent-vector.sml @@ -193,12 +193,7 @@ struct val idx = BinSearch.equalOrMore (cursorIdx, sizes) in if idx < 0 then {start = ~1, finish = ~1} - else if idx = 0 then - let - val current = Vector.sub (values, 0) - in - current - end + else if idx = 0 then Vector.sub (values, 0) else let val current = Vector.sub (values, idx) @@ -215,7 +210,13 @@ struct val idx = BinSearch.equalOrMore (cursorIdx, sizes) in if idx < 0 then {start = ~1, finish = ~1} - else helpPrevMatch (cursorIdx, Vector.sub (nodes, idx)) + else + let + val node = Vector.sub (nodes, idx) + val result = helpPrevMatch (cursorIdx, node) + in + result + end end fun loopPrevMatch (prevStart, tree, count) =