packages feed

combinat 0.2.3 → 0.2.3.1

raw patch · 2 files changed

+10/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Math/Combinat/Sets.hs view
@@ -42,12 +42,16 @@ -- TODO: better name? tuplesFromList :: Int -> [a] -> [[a]] tuplesFromList 0 _  = [[]]-tuplesFromList k xs = [ (y:ys) | y <- xs, ys <- tuplesFromList (k-1) xs ]+tuplesFromList k xs = [ (y:ys) | ys <- tuplesFromList (k-1) xs , y <- xs ]+--the order seems to be very important, the wrong order causes a memory leak!+--tuplesFromList k xs = [ (y:ys) | y <- xs, ys <- tuplesFromList (k-1) xs ]   -- | \"Tensor product\" for lists. listTensor :: [[a]] -> [[a]] listTensor [] = [[]]-listTensor (xs:xss) = [ y:ys | y <- xs, ys <- listTensor xss ]+listTensor (xs:xss) = [ y:ys | ys <- listTensor xss , y <- xs ]+--the order seems to be very important, the wrong order causes a memory leak!+--listTensor (xs:xss) = [ y:ys | y <- xs, ys <- listTensor xss ]  -------------------------------------------------------------------------------- @@ -62,7 +66,9 @@ -- | All sublists of a list. sublists :: [a] -> [[a]] sublists [] = [[]]-sublists (x:xs) = map (x:) (sublists xs) ++ sublists xs +sublists (x:xs) = sublists xs ++ map (x:) (sublists xs)  +--the order seems to be very important, the wrong order causes a memory leak!+--sublists (x:xs) = map (x:) (sublists xs) ++ sublists xs   -- | @# = 2^n@. countSublists :: Int -> Integer
combinat.cabal view
@@ -1,5 +1,5 @@ Name:                combinat-Version:             0.2.3+Version:             0.2.3.1 Synopsis:            Generation of various combinatorial objects. Description:         A collection of functions to generate combinatorial                      objects like partitions, combinations, permutations,