Fix data loss bug in update.
This commit is contained in:
parent
ad3c1f38b0
commit
fed46241f1
|
@ -21,7 +21,7 @@ intMapUpdate i f m =
|
|||
case (i, m) of
|
||||
(_, []) -> []
|
||||
(0, (x::xs)) -> (f x)::xs
|
||||
(n, (x::xs)) -> intMapUpdate (n-1) f xs
|
||||
(n, (x::xs)) -> x :: intMapUpdate (n-1) f xs
|
||||
|
||||
intMapPut : Int -> a -> IntMap a -> IntMap a
|
||||
intMapPut i v = intMapUpdate i (\_ -> v)
|
||||
|
|
Loading…
Reference in New Issue
Block a user