Fit works as expected, sort needs work
This commit is contained in:
parent
2e810eb03b
commit
397a741931
2
app/9.hs
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user