[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 15:23:19 UTC 2010
The following commit has been merged in the master branch:
commit ddbc48db0dffca332613dd9d6ba2024958c83045
Author: John Goerzen <jgoerzen at complete.org>
Date: Tue Apr 15 22:01:29 2008 -0500
Logic fix for binpacking
diff --git a/src/Data/BinPacking.hs b/src/Data/BinPacking.hs
index 8485f92..d356dff 100644
--- a/src/Data/BinPacking.hs
+++ b/src/Data/BinPacking.hs
@@ -113,7 +113,7 @@ packLargeFirst' [] remainder = Left (BPTooFewBins remainder)
packLargeFirst' (thisbinsize:otherbins) sizes =
let fillBin _ [] = Right []
fillBin accumsize sizelist =
- case break (\x -> (fst x) + accumsize < thisbinsize) sizelist of
+ case break (\x -> (fst x) + accumsize <= thisbinsize) sizelist of
(_, []) ->
if accumsize == 0
then Left $ BPSizeTooLarge thisbinsize (head sizelist)
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list