[input-output-hk/cardano-sl] [CO-347] Wallet’s UTXO histogram view (#3402)

paweljakubas commented on this pull request.

> + theHistogram
+ theAllStakes
+
+instance Example HistogramBar
+instance Example UtxoStatistics
+
+
+computeUtxoStatistics :: [Word64] -> UtxoStatistics
+computeUtxoStatistics xs = L.fold (summarizeUtxoStatistics $ generateBounds Log10) xs
+
+— Using foldl library enable as to capture a number of aggregations in one pass. This thanks to L.Fold being an Applicative
+summarizeUtxoStatistics :: NonEmpty Word64 -> L.Fold Word64 UtxoStatistics
+summarizeUtxoStatistics bounds =
+ UtxoStatistics
+ <$> populateBuckets bounds
+ <*> L.sum

done