Anonymous user
File size distribution: Difference between revisions
m
→{{header|Haskell}}
Line 448:
frequencyGroups _ [] = newFrequencyGroups
frequencyGroups totalGroups xs
| length xs == 1 =
| otherwise = foldr placeGroups newFrequencyGroups xs `using` parTraversable rseq
where
Line 479:
expand :: FrequencyGroups -> FrequencyGroups
expand = foldr f . withStrategy (parTraversable rseq) <*>
Map.mapWithKey groupsFromGroup .
where
f :: Maybe (FGKey, FrequencyGroups) -- ^ expanded frequency group
-> FrequencyGroups -- ^ accumulator
Line 498 ⟶ 496:
| otherwise = Nothing
where
displaySize :: Integer -> String
|