Created
February 6, 2021 16:20
-
-
Save mgryszko/fd1a34ef831f138f4733572b5bfe70d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def total(pricings: List[Pricing]): BigDecimal = | |
pricings.foldLeft(BigDecimal(0)) { (grandTotal, pricing) => | |
grandTotal + total(pricing) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment