We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff1be0a commit f57b117Copy full SHA for f57b117
containers/src/Data/IntMap/Internal.hs
@@ -439,12 +439,12 @@ deriving instance Lift a => Lift (IntMap a)
439
#endif
440
(!) m0 !k = go m0
441
where
442
- go (Bin p m l r) | nomatch k p m = not_found
443
- | zero k m = go l
444
- | otherwise = go r
+ go (Bin p l r) | left k p = go l
+ | otherwise = go r
445
go (Tip kx x) | k == kx = x
446
| otherwise = not_found
447
go Nil = not_found
+
448
not_found = error ("IntMap.!: key " ++ show k ++ " is not an element of the map")
449
450
-- | \(O(\min(n,W))\). Find the value at a key.
0 commit comments