gini-math-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Gini.Math.Amount

Synopsis

Documentation

sumAmounts :: (Foldable f, MonadThrow m) => f Amount -> m Amount #

Compute the sum of all amounts in a foldable data structure

>>> as <- mapM fromIntegral [1..10 :: Int] :: IO [Amount]
>>> sumAmounts as
55.000000000000000000000000