Tax.Util
Description
Shared utility functions used by other modules
fixEq :: Eq a => (a -> a) -> a -> a Source #
Repeatedly apply the function to the argument until it reaches the fixed point.
totalOf :: [Maybe Centi] -> Maybe Centi Source #
Sum the list of arguments; return Nothing iff all items are Nothing.
Nothing
difference :: Maybe Centi -> Maybe Centi -> Maybe Centi Source #
Subtraction under Maybe
Maybe
nonNegativeDifference :: Maybe Centi -> Maybe Centi -> Maybe Centi Source #
Non-negative subtraction under Maybe, returning Just 0 instead of negative results
Just 0
fractionOf :: Maybe Rational -> Maybe Centi -> Maybe Centi Source #
Multiplication under Maybe
leastOf :: [Maybe Centi] -> Maybe Centi Source #
The minimum of all amounts, Nothing ignored.