Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module Gini.Math.Amount.Internal
- sumAmounts :: (Foldable f, MonadThrow m) => f Amount -> m Amount
Documentation
module Gini.Math.Amount.Internal
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