Skip to content

Commit cbc585e

Browse files
committed
use go function within itself
1 parent 2ff6152 commit cbc585e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

containers/src/Data/Map/Internal.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,8 +1487,8 @@ elemAt = go where
14871487
go !_ Tip = error "Map.elemAt: index out of range"
14881488
go i (Bin _ kx x l r)
14891489
= case compare i sizeL of
1490-
LT -> elemAt i l
1491-
GT -> elemAt (i-sizeL-1) r
1490+
LT -> go i l
1491+
GT -> go (i-sizeL-1) r
14921492
EQ -> (kx,x)
14931493
where
14941494
sizeL = size l

0 commit comments

Comments
 (0)