diff --git a/src/CacheSim/IntMap.elm b/src/CacheSim/IntMap.elm index 7511207..adf8495 100644 --- a/src/CacheSim/IntMap.elm +++ b/src/CacheSim/IntMap.elm @@ -32,6 +32,6 @@ intMapFind f m = findHelper n l = case l of [] -> Nothing - (x::xs) -> if f x then Just n else findHelper (n - 1) xs + (x::xs) -> if f x then Just n else findHelper (n + 1) xs in findHelper 0 m