mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-08-16 16:50:46 +03:00
[ perf ] Do not split tree too early
This commit is contained in:
parent
276d41d86c
commit
f3eff838b2
@ -441,10 +441,9 @@ export
|
||||
split : Nat -> FingerTree (Elem a) -> (FingerTree (Elem a), FingerTree (Elem a))
|
||||
split _ Empty = (Empty, Empty)
|
||||
split i xs =
|
||||
let MkSplit l x r = splitTree i xs
|
||||
in if size xs > i
|
||||
then (l, x `consTree` r)
|
||||
else (xs, Empty)
|
||||
if size xs > i
|
||||
then let MkSplit l x r = splitTree i xs in (l, x `consTree` r)
|
||||
else (xs, Empty)
|
||||
|
||||
|
||||
-- Concatenation
|
||||
|
Loading…
Reference in New Issue
Block a user