Fix data loss bug in update.

This commit is contained in:
Danila Fedorin 2019-05-28 19:49:30 -07:00
parent ad3c1f38b0
commit fed46241f1
1 changed files with 1 additions and 1 deletions

View File

@ -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)