diff --git a/src/CacheSim/Cache.elm b/src/CacheSim/Cache.elm index 4290a41..0154989 100644 --- a/src/CacheSim/Cache.elm +++ b/src/CacheSim/Cache.elm @@ -67,7 +67,7 @@ findEmptySlot = findLruSlot : CacheSet -> Maybe Int findLruSlot cs = let - minLru = List.minimum <| List.map cacheSlotLru cs + minLru = List.maximum <| List.map cacheSlotLru cs isMin s = Just (cacheSlotLru s) == minLru in intMapFind isMin cs