diff --git a/app/9.hs b/app/9.hs index 3b3da21..1501151 100644 --- a/app/9.hs +++ b/app/9.hs @@ -34,7 +34,7 @@ fit :: [[ℜ]] -> [ℜ] -> [ℜ] fit s t = let (p,a) = break (elem None) s (n,a') = span (elem None) a in if null n then concat s ++ t else - concat p ++ if length n >= length t then t ++ concat a' ++ replicate (length n) None else fit a' t + concat p ++ if length (head n) >= length t then t ++ replicate (length n) None ++ concat a' else concat n ++ fit a' t sort2 :: [ℜ] -> [ℜ] sort2 s = let c = chunks s -- TODO: needs more work here