diff --git a/src/CacheSim/IntMap.elm b/src/CacheSim/IntMap.elm index 3503671..7511207 100644 --- a/src/CacheSim/IntMap.elm +++ b/src/CacheSim/IntMap.elm @@ -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)